summaryrefslogtreecommitdiffstats
path: root/system/apcupsd/patches/init-script-fixups.diff
diff options
context:
space:
mode:
Diffstat (limited to 'system/apcupsd/patches/init-script-fixups.diff')
-rw-r--r--system/apcupsd/patches/init-script-fixups.diff35
1 files changed, 35 insertions, 0 deletions
diff --git a/system/apcupsd/patches/init-script-fixups.diff b/system/apcupsd/patches/init-script-fixups.diff
new file mode 100644
index 0000000000..2e68c463fd
--- /dev/null
+++ b/system/apcupsd/patches/init-script-fixups.diff
@@ -0,0 +1,35 @@
+diff -Nur apcupsd-3.14.14.orig/platforms/slackware/apcupsd.in apcupsd-3.14.14/platforms/slackware/apcupsd.in
+--- apcupsd-3.14.14.orig/platforms/slackware/apcupsd.in 2015-01-29 08:13:25.000000000 -0600
++++ apcupsd-3.14.14/platforms/slackware/apcupsd.in 2017-05-29 21:34:28.782782149 -0500
+@@ -9,17 +9,18 @@
+ APCPID=@PIDDIR@/apcupsd.pid
+ DISTVER="@DISTVER@"
+
+-return=" Done."
++return=""
+
+
+ case "$1" in
+ start)
+ rm -f @PWRFAILDIR@/powerfail
+ rm -f @nologdir@/nologin
+- echo -n "Starting apcupsd power management.."
++ echo -n "Starting apcupsd power management: /sbin/apcupsd"
+ if [ -f ${APCPID} ]; then
+ return=" Already running."
+ else
++ mkdir -p @LOCKDIR@
+ @sbindir@/apcupsd && touch @LOCKDIR@/apcupsd \
+ || return=" Failed."
+ fi
+@@ -29,8 +30,9 @@
+ stop)
+ echo -n "Stopping apcupsd power management.."
+ if [ -f ${APCPID} ]; then
+- THEPID=`cat ${APCPID}`
++ THEPID=$(cat ${APCPID})
+ kill ${THEPID} || return=" Failed."
++ sleep 2
+ rm -f ${APCPID}
+ else
+ return=" Nothing to stop."