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

Bug#546019: apcupsd: pipe warning to WALL

Package: apcupsd
Version: 3.14.6-3
Tags: patch
File: /etc/apcupsd/apccontrol

Every other message is piped to WALL, except the *) case, for which a
normal unpiped "echo" is reasonably likely to go to the right place.
In the case of this script being called by apcupsd, I think stdout
will be ignored (it's just execv()d) and the message will currently be

--- /etc/apcupsd/apccontrol
+++ /tmp/tmp.uuJBPT/apccontrol	2009-09-10 11:01:10.000000000 -0700
@@ -58,7 +58,7 @@
 case "$1" in
-	echo "Apccontrol doing: ${APCUPSD} --killpower on UPS ${2}"
+	echo "Apccontrol doing: ${APCUPSD} --killpower on UPS ${2}" | ${WALL}
 	sleep 10
 	${APCUPSD} --killpower
 	echo "Apccontrol has done: ${APCUPSD} --killpower on UPS ${2}" | ${WALL}

Reply to: