powerman/powerman-piddir.patch
Tomáš Chvátal 00d888b67e Accepting request 243622 from home:sfalken:branches:hardware
- Updates in 2.3.16
  * Fix duplicate node name (Issue 35)
    Pulled in another hotlist fix (Mark Grondona)
  * Fix powerman stonith OFF should verify plug state (chaos bz 1439)
- Updated powerman-pidfile.patch to reflect /run instead of /var/run
   

- Updated to 2.3.16
  * Changed /var/run to /run in .spec to fix rpmlint check failures
    Updated URL in .spec file
  * Added:
	powerman-2.3.16.tar.gz
  * Removed:
	powerman-2.3.9.tar.bz2
  * Updated:
	powerman.spec

OBS-URL: https://build.opensuse.org/request/show/243622
OBS-URL: https://build.opensuse.org/package/show/hardware/powerman?expand=0&rev=23
2014-08-18 09:18:36 +00:00

26 lines
800 B
Diff

diff -rupN powerman-2.3.16.old/scripts/powerman.in powerman-2.3.16/scripts/powerman.in
--- powerman-2.3.16.old/scripts/powerman.in 2012-01-12 16:37:34.000000000 -0800
+++ powerman-2.3.16/scripts/powerman.in 2014-08-04 09:40:11.063544169 -0700
@@ -34,7 +34,8 @@ DESC="PowerMan"
DAEMON="$sbindir/powermand"
#DAEMON_ARGS=
CONFIG=$sysconfdir/powerman/powerman.conf
-PIDFILE="$localstatedir/run/powerman/powermand.pid"
+PIDDIR="/run/powerman"
+PIDFILE="$PIDDIR/powermand.pid"
#NICE=
USER=@RUN_AS_USER@
#SIGHUP_RELOAD=
@@ -54,6 +55,11 @@ service_init ()
SIGTERM_TIMEOUT="3"
STATUS=0
+if [ ! -d "$PIDDIR" ] ; then
+ mkdir "$PIDDIR"
+ chown $USER $PIDDIR
+fi
+
# Read configuration defaults to override variables:
# $DAEMON_ARGS, $CONFIG, $PIDFILE, $USER, $NICE, $SIGHUP_RELOAD
##