Sebastian Sztamblewski
2014-Oct-14 16:16 UTC
[Nut-upsuser] upssched not execute triggers - Fedora 20 and nut 2.7.2
ok, this function really worked? i have a linux Fedora 20 system, i install from rpm in version 2.6.2 and i this function not execute. Then i delete the rpm packet and all configuration files and compile latest stable 2.7.2 version with usb driver. ok, i first load ups driver: * /usr/local/ups/sbin/upsdrvctl -u root start* next i started */usr/local/ups/sbin/upsd* and next* /usr/local/ups/sbin/upsmon* when* /usr/local/ups/bin/upsc powermust* i have: [root at cenos run]# */usr/local/ups/bin/upsc powermust* battery.charge: 100 battery.voltage: 13.00 battery.voltage.high: 13.00 battery.voltage.low: 10.40 battery.voltage.nominal: 12.0 device.type: ups driver.name: blazer_usb driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.7.2 driver.version.internal: 0.11 input.current.nominal: 1.0 input.frequency: 50.0 input.frequency.nominal: 50 input.voltage: 241.4 input.voltage.fault: 241.4 input.voltage.nominal: 220 output.voltage: 230.2 ups.beeper.status: enabled ups.delay.shutdown: 30 ups.delay.start: 180 ups.load: 7 ups.productid: 5161 ups.status: OL ups.temperature: 25.0 ups.type: offline / line interactive ups.vendorid: 0665 perfectly worked all notification from *NOTIFYCOM **/etc/ups/script.sh* but i have big problem with *CMDSCRIPT* *upsmon.conf* *RUN_AS_USER ups* *MONITOR powermust at localhost 1 admin admin master* *MINSUPPLIES 1* *SHUTDOWNCMD "/sbin/shutdown -h now"* *POLLFREQ 5* *POLLFREQALERT 5* *HOSTSYNC 15* *DEADTIME 15* *POWERDOWNFLAG /etc/killpower* *RBWARNTIME 43200* *#NOCOMMWARNTIME 300* *FINALDELAY 5* *NOTIFYCMD /etc/ups/script.sh* *NOTIFYMSG ONLINE "UPS %s power back"* *NOTIFYMSG ONBATT "On batt %s"* *NOTIFYMSG FSD "FORCE SHUTDOWN"* *NOTIFYMSG SHUTDOWN "SYSTEM STOPPED"* *NOTIFYFLAG ONLINE EXEC+SYSLOG* *NOTIFYFLAG ONBATT EXEC+SYSLOG* *upssched.conf* *CMDSCRIPT /usr/local/ups/bin/upssched-cmd* *AT ONLINE * EXECUTE online* *AT ONBATT * EXECUTE shutdown* *# i tested with pipe/locked but without effect* *upssched-cmd - chmod 777 !!!* *#! /bin/sh## This script should be called by upssched via the CMDSCRIPT directive.# # Here is a quick example to show how to handle a bunch of possible# timer names with the help of the case structure.## This script may be replaced with another program without harm.## The first argument passed to your CMDSCRIPT is the name of the timer# from your AT lines.case $1 in online) logger "online" echo $* | mail -s "ups" dr.boczek at gmail.com <dr.boczek at gmail.com> ;; *) logger "Unrecognized command: $1" echo $* | mail -s "ups" dr.boczek at gmail.com <dr.boczek at gmail.com> ;;esac* unplug power and in /var/log/messages silent... NOTIFYCMD sent mu email but CMDSCRIPT not worked, why??? The system shutdown when my battery low but i must be execute *mdadm --readonly* before my system off. Any ideas??? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20141014/d1f64757/attachment-0001.html>
Roger Price
2014-Oct-15 07:46 UTC
[Nut-upsuser] upssched not execute triggers - Fedora 20 and nut 2.7.2
On Tue, 14 Oct 2014, Sebastian Sztamblewski wrote:> upssched.conf > CMDSCRIPT /usr/local/ups/bin/upssched-cmd > > AT ONLINE * EXECUTE online > AT ONBATT * EXECUTE shutdown > > # i tested with pipe/locked but without effectI've had a similar problem, In my case because PIPEFN and LOCKFN pointed to non-existant directories. Who owns upssched-cmd, root or ups? Roger