aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/apcupsd/apcupsd.SlackBuild8
-rw-r--r--system/apcupsd/patches/create_lockdir_in_init_script.diff11
-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 26601c3468ea..4a64e47297ad 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 024ac6d4cbe9..000000000000
--- 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 0ba9058a5a1d..2e68c463fd9f 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."