SOURCES: icecream-iceccd.init - PLDize a bit

paszczus paszczus at pld-linux.org
Tue Sep 9 14:58:52 CEST 2008


Author: paszczus                     Date: Tue Sep  9 12:58:52 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- PLDize a bit

---- Files affected:
SOURCES:
   icecream-iceccd.init (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/icecream-iceccd.init
diff -u SOURCES/icecream-iceccd.init:1.1 SOURCES/icecream-iceccd.init:1.2
--- SOURCES/icecream-iceccd.init:1.1	Tue Sep  9 14:48:09 2008
+++ SOURCES/icecream-iceccd.init	Tue Sep  9 14:58:46 2008
@@ -30,8 +30,8 @@
 
 start() {
 	[ -x $exec ] || exit 5
-	[ -f $config ] || exit 6
-	echo -n $"Starting distributed compiler daemon: "
+	if [ ! -f /var/lock/subsys/iceccd ]; then
+	msg_starting iceccd
 	params=""
 	if [ -n "$ICECREAM_NETNAME" ] ; then
 		params="$params -n $ICECREAM_NETNAME"
@@ -57,15 +57,18 @@
 		fi
 	fi
 	params="$params -b \"$ICECREAM_BASEDIR\""
-	daemon --check $service $exec -d -u icecream $params
+	daemon $service $exec -d -u icecream $params
 	RETVAL=$?
-	echo
 	[ $RETVAL -eq 0 ] && touch $lockfile
+        else
+                msg_already_running icecream
+        fi
+
 	return $RETVAL
 }
 
 stop() {
-	echo -n $"Stopping distributed compiler daemon: "
+	msg_stopping iceccd
 
 	killproc $service
 	RETVAL=$?
@@ -76,17 +79,14 @@
 	return $RETVAL
 }
 
-restart() {
-	stop
-	start
-}
-
-reload() {
-	restart
-}
-
-force_reload() {
-	restart
+condrestart() {
+        if [ -f /var/lock/subsys/icecream ]; then
+                stop
+                start
+        else
+                msg_not_running icecream
+                RETVAL=$1
+        fi
 }
 
 RETVAL=0
@@ -98,8 +98,7 @@
         stop
         ;;
   restart)
-        stop
-        start
+      	condrestart 
         ;;
   try-restart)
         condrestart 0
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/icecream-iceccd.init?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list