SOURCES: argus.init, argus.sysconfig - more pldizing

alucard alucard at pld-linux.org
Tue Feb 27 21:16:25 CET 2007


Author: alucard                      Date: Tue Feb 27 20:16:25 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- more pldizing

---- Files affected:
SOURCES:
   argus.init (1.3 -> 1.4) , argus.sysconfig (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/argus.init
diff -u SOURCES/argus.init:1.3 SOURCES/argus.init:1.4
--- SOURCES/argus.init:1.3	Tue Feb 27 14:46:52 2007
+++ SOURCES/argus.init	Tue Feb 27 21:16:19 2007
@@ -8,18 +8,22 @@
 . /etc/rc.d/init.d/functions
 
 # Get service config
-if [ -f /etc/sysconfig/argus ]; then
-	. /etc/sysconfig/argus
+[ -f /etc/sysconfig/argus ] && . /etc/sysconfig/argus
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+		msg_network_down argus
+		exit 1
+	fi
 else
-	nls "Error: %s not found" /etc/sysconfig/argus
-	nls "argus daemon can't be run."
-	exit 1
+	exit 0
 fi
 
 start() {
 	if [ ! -f /var/lock/subsys/argus ]; then
 		msg_starting argus
-		daemon --user argus argus -d -w /var/log/argus/argus.log
+		daemon --user argus argus -d "${LOG}"
 		RETVAL=$?
 		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/argus
 	else
@@ -38,6 +42,17 @@
 	fi
 }
 
+reload() {
+	if [ -f /var/lock/subsys/argus ]; then
+		msg_reloading argus
+		killproc argus -HUP
+		RETVAL=$?
+	else
+		msg_not_running argus
+		RETVAL=7
+	fi
+}
+
 RETVAL=0
 # See how we were called.
 case "$1" in
@@ -55,14 +70,7 @@
 	;;
 
   reload|force-reload)
-	if [ -f /var/lock/subsys/argus ]; then
-		msg_reloading argus
-		killproc argus -HUP
-		RETVAL=$?
-	else
-		msg_not_running argus
-		exit 7
-	fi
+  	reload
 	;;
 
   status)
@@ -76,3 +84,6 @@
 esac
 
 exit $RETVAL
+
+# This must be last line !
+# vi:syntax=sh

================================================================
Index: SOURCES/argus.sysconfig
diff -u SOURCES/argus.sysconfig:1.1 SOURCES/argus.sysconfig:1.2
--- SOURCES/argus.sysconfig:1.1	Tue Feb 27 14:28:14 2007
+++ SOURCES/argus.sysconfig	Tue Feb 27 21:16:20 2007
@@ -3,3 +3,5 @@
 # Try to define nice-level for running argus
 SERVICE_RUN_NICE_LEVEL="+0"
 
+# set argus log file
+LOG="-w /var/log/argus/argus.log"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/argus.init?r1=1.3&r2=1.4&f=u
    http://cvs.pld-linux.org/SOURCES/argus.sysconfig?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list