[CentOS] 2 questions re UPS management
Gordon Messmer
yinyang at eburg.com
Tue Mar 19 22:39:03 UTC 2013
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.
More information about the CentOS
mailing list