[Fedora-directory-commits] adminserver/wrappers initscript.in, 1.4, 1.5

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu Jan 10 16:48:41 UTC 2008


Author: rmeggins

Update of /cvs/dirsec/adminserver/wrappers
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20492/adminserver/wrappers

Modified Files:
	initscript.in 
Log Message:
Resolves: bug 249548
Description: Review Request: fedora-ds-admin - Administration server used by Fedora Directory Server
Fix Description: packaging, spec, and initscript fixes for package review


Index: initscript.in
===================================================================
RCS file: /cvs/dirsec/adminserver/wrappers/initscript.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- initscript.in	8 Dec 2007 17:42:49 -0000	1.4
+++ initscript.in	10 Jan 2008 16:48:38 -0000	1.5
@@ -94,11 +94,14 @@
 piddir="@localstatedir@/run/@PACKAGE_BASE_NAME@"
 # PID file
 pidfile=$piddir/admin-serv.pid
+lockfile=/var/lock/subsys/@package_name@
 
 [ -f $exec ] || exit 0
 
 umask 077
 
+RETVAL=0
+
 # since we use the start script to start admin, we source the
 # init config file there, not here
 # if we ever get rid of the start script, we'll have to uncomment
@@ -136,6 +139,7 @@
             server_started=1 # well, perhaps not running, but started ok
         else
             failure; echo
+            RETVAL=1
         fi
     fi
     if [ $server_started -eq 1 ] ; then
@@ -156,8 +160,10 @@
         else
             echo_n "*** Error: $prog failed to start"
             failure; echo
+            RETVAL=1
         fi
     fi
+    [ $RETVAL -eq 0 -a -d /var/lock/subsys ] && touch $lockfile
 }
 
 stop() {
@@ -176,6 +182,7 @@
                 server_stopped=1
             else
                 failure; echo
+                RETVAL=1
             fi
         fi
         if [ $server_stopped -eq 1 ] ; then
@@ -196,12 +203,14 @@
             if test -f $pidfile ; then
                 echo_n "*** Error: $prog failed to stop"
                 failure; echo
+                RETVAL=1
             else
                 success; echo
                 rm -f $pidfile
             fi
         fi
     fi
+    [ $RETVAL -eq 0 ] && rm -f $lockfile
 }
 
 restart() {




More information about the Fedora-directory-commits mailing list