[Nut-upsuser] placement of ups shutdown command for snmp systems

lutz.niederer at gmx.net lutz.niederer at gmx.net
Thu May 16 10:23:47 UTC 2013


Hi,
 
on Debian and maybe other systems one of the last steps the system's shutdown procedure does is to shut down the UPS via upsdrvctl to turn off the machine and to conserve power.  But this is a place where network communications via SNMP is not possible anymore because the interfaces are down.
 
So, I am looking for a good place where I can turn off the UPS.  In upsmon.conf there is the SHUTDOWNCMD.  Currently this is something like "/sbin/shutdown -h +0".  I thought I could change that to a shell script that sends the UPS a shutdown with delay command (90sec) and then immediately runs the "/sbin/shutdown -h +0" command.
 
In the shutdown procedure that is initiated via shutdown -h +0 is there any point where the shutdown could be interrupted due to power coming back or is this the final command that always results in the machine being brought down?  I looked through the scripts that are involved and found nothing.  So my thoughts are that this is a safe place for the ups shutdown command.
 
Thank for hints, tips, ideas and comments!
 
-lutzn
 
 



More information about the Nut-upsuser mailing list