[Open-FCoE] [PATCH 02/13] fcoe-utils: init scripts pass debug flag to fcoemon

Robert Love robert.w.love at intel.com
Thu Jul 2 16:27:58 UTC 2009


From: Rob Love <robert.w.love at intel.com>

Pass the --debug flag to fcoemon if DEBUG=yes in the config
file.

Since fcoemon is no longer reading the /etc/fcoe/config file
the init script needs to pass the debug flag to it.

Signed-off-by: Robert Love <robert.w.love at intel.com>
---

 etc/initd/initd.fedora |    5 +++--
 etc/initd/initd.suse   |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/etc/initd/initd.fedora b/etc/initd/initd.fedora
index 15d9a0f..e0b97f6 100755
--- a/etc/initd/initd.fedora
+++ b/etc/initd/initd.fedora
@@ -34,6 +34,7 @@ FCOEMON=/usr/sbin/fcoemon
 FCOEADM=/usr/sbin/fcoeadm
 DCBD=dcbd
 LOGGER="logger -t fcoe -s"
+FCOEMON_OPTS=
 
 . /etc/init.d/functions
 
@@ -89,7 +90,7 @@ if [ "$USE_SYSLOG" != "yes" ] && [ "$USE_SYSLOG" != "YES" ]; then
 fi
 
 if [ "$DEBUG" = "yes" ] || [ "$DEBUG" = "YES" ]; then
-	DEBUG="yes"
+	FCOEMON_OPTS+=" --debug"
 fi
 
 test -x $CONFIG_SCRIPT || {
@@ -180,7 +181,7 @@ service_start()
 	# daemon to create the FCoE interfaces for these ports.
 	#
 	if [ "$HAS_DCB_IF" = "true" ]; then
-	    daemon --pidfile ${PID_FILE} ${FCOEMON}
+	    daemon --pidfile ${PID_FILE} ${FCOEMON} ${FCOEMON_OPTS}
 	fi
 
 	return
diff --git a/etc/initd/initd.suse b/etc/initd/initd.suse
index 3dd18e6..398ed7b 100755
--- a/etc/initd/initd.suse
+++ b/etc/initd/initd.suse
@@ -47,6 +47,7 @@ FCOEMON=/usr/sbin/fcoemon
 FCOEADM=/usr/sbin/fcoeadm
 DCBD=dcbd
 LOGGER="logger -t fcoe -s"
+FCOEMON_OPTS=
 
 . /etc/rc.status
 rc_reset
@@ -113,7 +114,7 @@ if [ "$USE_SYSLOG" != "yes" ] && [ "$USE_SYSLOG" != "YES" ]; then
 	LOGGER="echo"
 fi
 if [ "$DEBUG" = "yes" ] || [ "$DEBUG" = "YES" ]; then
-	DEBUG="yes"
+	FCOEMON_OPTS+=" --debug"
 fi
 
 test -x $CONFIG_SCRIPT || {
@@ -219,7 +220,7 @@ service_start()
 	# daemon to create the FCoE interfaces for these ports.
 	#
 	if [ "$HAS_DCB_IF" = "true" ]; then
-		startproc -l ${LOG_FILE} -p ${PID_FILE} ${FCOEMON}
+		startproc -l ${LOG_FILE} -p ${PID_FILE} ${FCOEMON} ${FCOEMON_OPTS}
 	fi
 
 	rc_status -v




More information about the devel mailing list