[Nut-upsuser] powercom issues

Martin Ivanov tramni at abv.bg
Thu Aug 17 19:49:09 UTC 2006


And something else, that previously eluded from my thoughts:my "notifyme" script,i.e the script that is executed at an ups.status="OB" event, is:
echo `date` >> /root/upsLog
echo "	No power, shutting down the system!" >> /root/upsLog
sleep 30
control=`/usr/local/ups/bin/upsc Inform at localhost ups.status`
if [ $control != OL ]
then
 /usr/local/ups/sbin/upsmon -c fsd
fi

I changed "telinit 0 " to "upsmon -c fsd", following the advice of Mr Selinger from the mailing list. Besides, I added "shutdownArguments={{1,0},y}" to ups.conf, as you advised me. With this configuration, if the system works correctly, according to me things should go like that in case of a prolonged power failure:
power failure->ups.status=="OB"->"upsmon -c fsd"->system shutdown(normal shutdown, involving runnint the shutdown scripts in rc.0->UPS shutdown one minute after the "upsmon -c fsd" command was issued. I deliberately set one minute time lapse between the issuing of the forced shutdown and the UPS shutdown, so that there is enough time for the system to run the shutdown scripts before shutting down. However, when I tested it, the system went down, but the UPS did not. So I think the UPS doesnot recognise the "upsmon -c fsd" command correctly. Am I right, or I am mistaken?

Thank you very much for your attention. I am looking forward to your answer.
Regards, 
Martin

-----------------------------------------------------------------
http://ide.li/ - портал за българите по света. Статии, новини, форуми, снимки, информация.



More information about the Nut-upsuser mailing list