diff options
Diffstat (limited to 'system/apcupsd/patches')
-rw-r--r-- | system/apcupsd/patches/create_lockdir_in_init_script.diff | 11 | ||||
-rw-r--r-- | system/apcupsd/patches/init-script-fixups.diff (renamed from system/apcupsd/patches/nitpicky-fixes-to-init-script.diff) | 16 |
2 files changed, 11 insertions, 16 deletions
diff --git a/system/apcupsd/patches/create_lockdir_in_init_script.diff b/system/apcupsd/patches/create_lockdir_in_init_script.diff deleted file mode 100644 index 024ac6d4cb..0000000000 --- a/system/apcupsd/patches/create_lockdir_in_init_script.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur apcupsd-3.14.13.orig/platforms/slackware/apcupsd.in apcupsd-3.14.13/platforms/slackware/apcupsd.in ---- apcupsd-3.14.13.orig/platforms/slackware/apcupsd.in 2015-01-29 08:13:25.000000000 -0600 -+++ apcupsd-3.14.13/platforms/slackware/apcupsd.in 2015-08-17 22:49:30.754638339 -0500 -@@ -20,6 +20,7 @@ - if [ -f ${APCPID} ]; then - return=" Already running." - else -+ mkdir -p @LOCKDIR@ - @sbindir@/apcupsd && touch @LOCKDIR@/apcupsd \ - || return=" Failed." - fi diff --git a/system/apcupsd/patches/nitpicky-fixes-to-init-script.diff b/system/apcupsd/patches/init-script-fixups.diff index 0ba9058a5a..2e68c463fd 100644 --- a/system/apcupsd/patches/nitpicky-fixes-to-init-script.diff +++ b/system/apcupsd/patches/init-script-fixups.diff @@ -1,7 +1,7 @@ -diff -Nur apcupsd-3.14.13.orig/platforms/slackware/apcupsd.in apcupsd-3.14.13/platforms/slackware/apcupsd.in ---- apcupsd-3.14.13.orig/platforms/slackware/apcupsd.in 2015-08-17 22:51:39.595562965 -0500 -+++ apcupsd-3.14.13/platforms/slackware/apcupsd.in 2015-08-17 22:51:34.106608743 -0500 -@@ -9,14 +9,14 @@ +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@" @@ -18,12 +18,18 @@ diff -Nur apcupsd-3.14.13.orig/platforms/slackware/apcupsd.in apcupsd-3.14.13/pl if [ -f ${APCPID} ]; then return=" Already running." else -@@ -30,7 +30,7 @@ ++ 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." |