<HTML><BODY><div class="js-helper js-readmsg-msg">
<style type="text/css"></style>
<div>
<base target="_self" href="https://e.mail.ru/">
<div id="style_14683130470000000753_BODY">
Hi<br><br> I need to shutdown a number of hosts which has not NUT from one which has it.<br><br> I tried to do it from upssched script (after upssched's timer) like this:<br><br>case $1 in<br> earlyshutdown)<br> logger -t upssched-cmd "Early shutdown is started"<br> /bin/sh /usr/local/sbin/shutdown-all-hosts.sh<br> /usr/local/sbin/upsmon -c fsd<br> ;;<br>esac<br><br> shutdown-all-hosts.sh contains:<br># Linux hosts<br>HOSTLIST="sim iogate br"<br>for host in $HOSTLIST<br>do<br>...<br> ssh $host halt -p<br>...<br>done<br># Windows hosts<br>ssh shut@com "shutdown -s -t 0"<br><br> shutdown-all-hosts.sh works fine if it runned manually.<br> But it does not work even if I insert sleep 30 sec before upsmon -c fsd<br> Also I read somewhere that it is not a good idea to shutdown other hosts from the CMDSCRIPT.<br><br> Does anyone know how to shutdown hosts without NUT from a host with NUT?<br><br>Thanks in advance<br>Dmitri Stepanov
</div>
<base target="_self" href="https://e.mail.ru/">
</div>
</div></BODY></HTML>