Hi
I need to shutdown a number of hosts which has not NUT from one which has it.
I tried to do it from upssched script (after upssched's timer) like this:
case $1 in
earlyshutdown)
logger -t upssched-cmd "Early shutdown is started"
/bin/sh /usr/local/sbin/shutdown-all-hosts.sh
/usr/local/sbin/upsmon -c fsd
;;
esac
shutdown-all-hosts.sh contains:
# Linux hosts
HOSTLIST="sim iogate br"
for host in $HOSTLIST
do
...
ssh $host halt -p
...
done
# Windows hosts
ssh shut@com "shutdown -s -t 0"
shutdown-all-hosts.sh works fine if it runned manually.
But it does not work even if I insert sleep 30 sec before upsmon -c fsd
Also I read somewhere that it is not a good idea to shutdown other hosts
from the CMDSCRIPT.
Does anyone know how to shutdown hosts without NUT from a host with NUT?
Thanks in advance
Dmitri Stepanov
_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser