--- fcoe-utils-1.0.14/etc/initd/initd.fedora.orig 2010-06-03 13:26:01.000000000 +0200 +++ fcoe-utils-1.0.14/etc/initd/initd.fedora 2010-06-03 13:28:10.000000000 +0200 @@ -100,11 +100,13 @@ status() { + status=0 pidof $FCOEMON if [ $? -eq 0 ]; then echo "$FCOEMON -- RUNNING, pid=`cat $PID_FILE`" else echo "$FCOEMON -- UNUSED" + status=3 fi interfaces=`$FCOEADM -i 2>&1 | \ @@ -115,9 +117,15 @@ echo "No interfaces created." else echo "Created interfaces: $interfaces" + status=0 fi - test -f /var/lock/subsys/fcoe - return $@ + if [ -f /var/lock/subsys/fcoe -a $status -eq 3 ]; then + status=2 + fi + if [ -f /var/run/fcoe.pid -a $status -eq 3 ]; then + status=1 + fi + return $status } case "$1" in @@ -135,22 +143,20 @@ ;; force-reload) - echo "force-reload not yet implemented" - failure - ;; - - reload) - echo "reload not yet implemented" - failure + stop force + start ;; status) status exit $? ;; - + condrestart|try-restart) + status || exit 0 + restart + ;; *) - echo "Usage: $0 {start|stop [force]|status|restart [force]}" + echo "Usage: $0 {start|stop [force]|status|restart [force]|force-reload|condrestart|try-restart}" exit 1 ;; esac