diff options
author | Robby Workman <rworkman@slackbuilds.org> | 2017-05-29 21:37:31 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-06-03 08:00:05 +0700 |
commit | 060221841fd777b16db609eefe1e85862380279a (patch) | |
tree | 84f2a276d2e8be22abe365486191c51abb2b8e72 /system | |
parent | becbe6fb2c277ade67ac3cc6619bf5d9697c68a6 (diff) | |
download | slackbuilds-060221841fd777b16db609eefe1e85862380279a.tar.gz |
system/apcupsd: fixup a restart issue + minor tweaks
Thanks to Fabio Bas for the bug report and solution.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/apcupsd/apcupsd.SlackBuild | 8 | ||||
-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 |
3 files changed, 15 insertions, 20 deletions
diff --git a/system/apcupsd/apcupsd.SlackBuild b/system/apcupsd/apcupsd.SlackBuild index 26601c3468..4a64e47297 100644 --- a/system/apcupsd/apcupsd.SlackBuild +++ b/system/apcupsd/apcupsd.SlackBuild @@ -27,12 +27,12 @@ PRGNAM=apcupsd VERSION=${VERSION:-3.14.14} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -43,8 +43,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" 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." |