rc-inetd: rc-inetd, rc-inetd.conf - commit SOURCES/rc-inetd-allow_...

glen glen at pld-linux.org
Thu Nov 1 20:33:49 CET 2007


Author: glen                         Date: Thu Nov  1 19:33:49 2007 GMT
Module: rc-inetd                      Tag: HEAD
---- Log message:
- commit SOURCES/rc-inetd-allow_manual_config.patch

---- Files affected:
rc-inetd:
   rc-inetd (1.40 -> 1.41) , rc-inetd.conf (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: rc-inetd/rc-inetd
diff -u rc-inetd/rc-inetd:1.40 rc-inetd/rc-inetd:1.41
--- rc-inetd/rc-inetd:1.40	Thu Nov  1 20:33:15 2007
+++ rc-inetd/rc-inetd	Thu Nov  1 20:33:44 2007
@@ -12,10 +12,14 @@
 
 . /etc/rc.d/init.d/functions
 
+AUTO_CONFIG=yes
+
 # sanity check for /etc/sysconfig/rc-inetd.conf
-# Note: defaults must be read for each service, because they will be replaced
+# Note: defaults must also be read for each service, because they will be replaced
 #	by config of each service processed.
-if [ ! -f /etc/sysconfig/rc-inetd.conf ]; then
+if [ -f /etc/sysconfig/rc-inetd.conf ]; then
+	. /etc/sysconfig/rc-inetd.conf
+else
 	nls "Error: %s not found" /etc/sysconfig/rc-inetd.conf
 	nls " Inet server can't be run."
 	exit 6
@@ -147,12 +151,17 @@
 		msg_already_running Inet
 	fi
 
-	show "$(nls "Generating %s for %s" "$CONFIG_FILE" "$PROCESS_NAME")"
-	busy
-	pre_start_services
-	gen_config_file
-	DIDPARSE=$?
-	deltext;ok
+	if [ "$AUTO_CONFIG" != "no" ]; then
+		show "$(nls "Generating %s for %s" "$CONFIG_FILE" "$PROCESS_NAME")"
+		busy
+		pre_start_services
+		gen_config_file
+		DIDPARSE=$?
+		deltext;ok
+	else
+		DIDPARSE=1
+	fi
+
 	if [ "$DIDPARSE" -gt 0 ]; then
 		msg_starting "$PROCESS_NAME"
 		daemon $INETDAEMON $INETDAEMON_ARGS
@@ -180,10 +189,13 @@
 		exit 7
 	fi
 
-	show "$(nls "Generating %s for %s" "$CONFIG_FILE" "$PROCESS_NAME")"
-	busy
-	gen_config_file
-	deltext; ok
+	if [ "$AUTO_CONFIG" != "no" ]; then
+		show "$(nls "Generating %s for %s" "$CONFIG_FILE" "$PROCESS_NAME")"
+		busy
+		gen_config_file
+		deltext; ok
+	fi
+
 	show "$(nls "Reload %s service configuration" "$PROCESS_NAME")"
 	busy
 	reload_config

================================================================
Index: rc-inetd/rc-inetd.conf
diff -u rc-inetd/rc-inetd.conf:1.4 rc-inetd/rc-inetd.conf:1.5
--- rc-inetd/rc-inetd.conf:1.4	Thu Jan 17 20:40:59 2002
+++ rc-inetd/rc-inetd.conf	Thu Nov  1 20:33:44 2007
@@ -1,5 +1,11 @@
 # This file contains several rc-inetd configuration parameters
 
+# Do you want rc-inetd to automagically generate inetd config?
+# Warning: this will overwrite current configuration without asking!
+# Default: yes
+
+AUTO_CONFIG="yes"
+
 # List deny services. List must contain services names separated by space
 # or tab.
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/rc-inetd/rc-inetd?r1=1.40&r2=1.41&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/rc-inetd/rc-inetd.conf?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list