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

Signed-off-by: Robert Love <[email protected]>
---

 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

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to