秒密钥前提下的分发脚本:

[abu@NFS scriptc]$ cat fenfa.sh 

#!/bin/bash

. /etc/init.d/functions

if [ $# -ne 2 ]

then

echo "argv is not right."

exit 1

fi    

for ip in `cat iplist`

do

scp -P52113 $1 abu@$ip:$2  >/dev/null 2>&1

if [ $? -eq 0 ];then 

action "$ip" /bin/true

else

action "$ip" /bin/false

fi

done