Re: 2 questions re UPS management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 03/19/2013 01:55 PM, Craig White wrote:
> having the commands in an external script would fork a new process outside of the inittab so if it were me, I would simply join the commands to run as one within the inittab i.e..
>
> /usr/bin/net rpc SHUTDOWN -C \
>    "System shutting down NOW due to power failure" \
>    -f -I 172.19.23.120 \
>    -U <myusername>%<mypassword> && \
>    /sbin/shutdown -f -h +5 \
>    "Power Failure; System Shutting Down"

For the love of god, don't do that!  Using "&&," if the Windows host 
isn't available, and "net" exits with an error code, the local system 
won't be instructed to shut down.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux