aboutsummaryrefslogtreecommitdiff
path: root/system/apcupsd/patches
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2013-05-15 13:11:49 -0500
committerRobby Workman <rworkman@slackbuilds.org>2013-06-04 00:09:20 -0500
commit699843a16912442788d9c2b762ba049d50af7ecb (patch)
tree9e33d8715a807e5952c544c5b3f880e0b5ab8906 /system/apcupsd/patches
parent39e0617de045f99fb245b6c0006b53e1f5f62ac9 (diff)
system/apcupsd: Fix lockdir definition and usage
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/apcupsd/patches')
-rw-r--r--system/apcupsd/patches/create_lockdir_in_init_script.diff11
-rw-r--r--system/apcupsd/patches/fix_lockdir_in_config_file.diff12
2 files changed, 23 insertions, 0 deletions
diff --git a/system/apcupsd/patches/create_lockdir_in_init_script.diff b/system/apcupsd/patches/create_lockdir_in_init_script.diff
new file mode 100644
index 0000000000000..06d158fb91e94
--- /dev/null
+++ b/system/apcupsd/patches/create_lockdir_in_init_script.diff
@@ -0,0 +1,11 @@
+diff -Nur apcupsd-3.14.10.orig/platforms/slackware/apcupsd.in apcupsd-3.14.10/platforms/slackware/apcupsd.in
+--- apcupsd-3.14.10.orig/platforms/slackware/apcupsd.in 2005-03-03 11:18:09.000000000 -0600
++++ apcupsd-3.14.10/platforms/slackware/apcupsd.in 2012-09-07 21:31:27.347857464 -0500
+@@ -20,6 +20,7 @@
+ if [ -f ${APCPID} ]; then
+ return=" Already running."
+ else
++ mkdir -p @LOCKDIR@/subsys
+ @sbindir@/apcupsd && touch @LOCKDIR@/subsys/apcupsd \
+ || return=" Failed."
+ fi
diff --git a/system/apcupsd/patches/fix_lockdir_in_config_file.diff b/system/apcupsd/patches/fix_lockdir_in_config_file.diff
new file mode 100644
index 0000000000000..d260abd57980c
--- /dev/null
+++ b/system/apcupsd/patches/fix_lockdir_in_config_file.diff
@@ -0,0 +1,12 @@
+diff -Nur apcupsd-3.14.10.orig/platforms/etc/apcupsd.conf.in apcupsd-3.14.10/platforms/etc/apcupsd.conf.in
+--- apcupsd-3.14.10.orig/platforms/etc/apcupsd.conf.in 2011-05-19 17:55:25.000000000 -0500
++++ apcupsd-3.14.10/platforms/etc/apcupsd.conf.in 2013-05-15 12:44:25.497885953 -0500
+@@ -90,7 +90,7 @@
+
+ # LOCKFILE <path to lockfile>
+ # Path for device lock file. Not used on Win32.
+-LOCKFILE @LOCKDIR@
++LOCKFILE @LOCKDIR@/subsys
+
+ # SCRIPTDIR <path to script directory>
+ # Directory in which apccontrol and event scripts are located.