r4221 - in trunk/bootscripts: . lfs/init.d

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Sun Sep 26 23:01:22 PDT 2004


Author: nathan
Date: 2004-09-27 00:01:19 -0600 (Mon, 27 Sep 2004)
New Revision: 4221

Modified:
   trunk/bootscripts/CHANGELOG
   trunk/bootscripts/lfs/init.d/functions
Log:
Added the opional -nomsg tag for loadproc/killproc

Modified: trunk/bootscripts/CHANGELOG
===================================================================
--- trunk/bootscripts/CHANGELOG	2004-09-27 05:54:56 UTC (rev 4220)
+++ trunk/bootscripts/CHANGELOG	2004-09-27 06:01:19 UTC (rev 4221)
@@ -3,6 +3,8 @@
 	  prefix for boot messages (James Robert)
 	* fixed localnet status, to use ip instead of ifconfig (Jim Gifford)
 	* Added consolelog to contrib (DJ Lucas)
+	* loadproc and killproc can have the -nomsg parameter to avoid
+	  calling evaluate_retval or print_service (Jim Gifford)
 
 n/a - September 24, 2004
 	* Removed /dev/udev.tdb test

Modified: trunk/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/bootscripts/lfs/init.d/functions	2004-09-27 05:54:56 UTC (rev 4220)
+++ trunk/bootscripts/lfs/init.d/functions	2004-09-27 06:01:19 UTC (rev 4221)
@@ -284,7 +284,7 @@
 loadproc()
 {
 	if [ "$#" = "0" ]; then
-		echo "Usage: loadproc {program}"
+		echo "Usage: loadproc {program} [-nomsg]"
 		exit 1
 	fi
 
@@ -293,8 +293,13 @@
 	if [ "$nopid" = "0" ]; then
 		"$@"
 		evaluate_retval
+		if [ "$2" != "-nomsg" ]; then
+			evaluate_retval
+		fi
 	else
-		print_status warning running
+		if [ "$2" != "-nomsg" ]; then
+			print_status warning not_running
+		fi
 	fi
 }
 
@@ -302,7 +307,7 @@
 killproc()
 {
 	if [ -z "$PIDFILE" -a -z "$#" ]; then
-		echo "Usage: killproc [{program}]"
+		echo "Usage: killproc [{program}] [-nomsg]"
 		exit 1	
 	fi
 
@@ -349,9 +354,14 @@
 		fi
 
 		(exit $failure)
-		evaluate_retval
+
+		if [ "$2" != "-nomsg" ]; then
+			evaluate_retval
+		fi
 	else
-		print_status warning not_running
+		if [ "$2" != "-nomsg" ]; then
+			print_status warning not_running
+		fi
 	fi
 }
 




More information about the lfs-book mailing list