If fcoemon is already started we should not try to start
another instance of it.

Signed-off-by: Hannes Reinecke <[email protected]>
---
 etc/initd/initd.suse |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/etc/initd/initd.suse b/etc/initd/initd.suse
index 1d358be..c4a040a 100755
--- a/etc/initd/initd.suse
+++ b/etc/initd/initd.suse
@@ -87,10 +87,15 @@ start()
 {
        echo -n $"Starting FCoE initiator service: "
 
-       startup_fcoe_modules
-
-       startproc -l ${LOG_FILE} ${FCOEMON} ${FCOEMON_OPTS}
+       pid=$($FCOEADM -p 2> /dev/null)
+       if [ -z "$pid" ] ; then     
+           startup_fcoe_modules
 
+           startproc -l ${LOG_FILE} ${FCOEMON} ${FCOEMON_OPTS}
+       else
+           echo -n "(already running)"
+           rc_reset
+       fi
        rc_status -v
 }
 
-- 
1.7.10.4

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

Reply via email to