From 322f2a408415989559156320b46de2e6d23f8729 Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Thu, 29 Oct 2009 18:31:29 +0000 Subject: [PATCH 1/1] https://issues.shibboleth.net/jira/browse/SSPCPP-247 --- configs/shibd-redhat.in | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/configs/shibd-redhat.in b/configs/shibd-redhat.in index 2f976c9..7ffb186 100644 --- a/configs/shibd-redhat.in +++ b/configs/shibd-redhat.in @@ -14,6 +14,7 @@ shibd="@-PREFIX-@/sbin/shibd" SHIBD_USER=root pidfile=@-PKGRUNDIR-@/shibd.pid prog=shibd +VER=`cat /etc/redhat-release | awk '{print $3}' | awk -F . '{print $1}'` RETVAL=0 start() { @@ -24,7 +25,7 @@ start() { if checkpid $kpid 2>&1; then echo "process already running" return -1 - else + else echo "lock file found but no process running for pid $kpid, continuing" fi fi @@ -36,7 +37,11 @@ start() { if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then /sbin/restorecon $pidfile fi - daemon --user $SHIBD_USER --pidfile $pidfile $shibd -p $pidfile -f -w 30 + if [ 5 -le $VER ] ; then + daemon --user $SHIBD_USER --pidfile $pidfile $shibd -p $pidfile -f -w 30 + else + daemon --user $SHIBD_USER $shibd -p $pidfile -f -w 30 + fi RETVAL=$? echo @@ -46,10 +51,10 @@ start() { stop() { echo -n $"Stopping $prog: " - if [ -f $pidfile ]; then + if [ -f $pidfile -a 5 -le $VER] ; then killproc -p $pidfile shibd else - killproc shibd + killproc shibd fi RETVAL=$? @@ -66,7 +71,7 @@ case "$1" in stop ;; status) - status $shibd + status $shibd RETVAL=$? ;; restart) -- 2.1.4