]> git.pld-linux.org Git - packages/eagle-usb.git/commitdiff
- some LSB compliance
authorankry <ankry@pld-linux.org>
Mon, 6 Oct 2003 00:42:23 +0000 (00:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eagle.init -> 1.4

eagle.init

index cc52d880c2369c6df9e53fc38eb13ed989f6ecd4..dab0e5ef320587f5521d44faf0c3b988f14c5a46 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # eagle        starts/stops internet connection provided by adsl usb modem
 #
-# chkconfig:    2345   09 91   
+# chkconfig:   2345 09 91      
 #
 # description: eagle starts/stops internet connection provided by adsl usb \
 #              modem based on Analog Devices Inc. USB ADSL Modem chip - \
@@ -21,7 +21,7 @@
 
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
-       if [ ! -f /var/lock/subsys/network ]; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
                # nls "ERROR: Networking is down. %s can't be run." eagle
                msg_network_down eagle
                exit 1
@@ -31,12 +31,13 @@ else
 fi
 
 
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/eagle ]; then
-               # show "Starting %s service" eagle
+               # show "Starting %s service" eagle
                msg_starting eagle
                /usr/sbin/startadsl
                RETVAL=$?
@@ -50,30 +51,28 @@ case "$1" in
        else
                # show "%s service is already running." eagle
                msg_already_running eagle
-               exit 1
        fi
-        ;;
+       ;;
   stop)
-        # show "Stopping %s service" eagle
        if [ -f /var/lock/subsys/eagle ]; then
+               # show "Stopping %s service" eagle
                msg_stopping eagle
                /usr/sbin/stopadsl
                RETVAL=$?
                if [ $RETVAL -eq 0 ]; then
-                       rm -f /var/lock/subsys/eagle
+                       rm -f /var/lock/subsys/eagle
                        ok
-               fi
+               fi
        else
                # show "%s service is not running." eagle
                msg_not_running eagle
-               exit 1
        fi      
-        ;;
+       ;;
   restart)
-        $0 stop
+       $0 stop
        $0 start
-        ;;
-  reload)
+       ;;
+  reload|force-reload)
        if [ -f /var/lock/subsys/eagle ]; then
                # show "Reload %s service" eagle
                msg_reloading eagle
@@ -81,25 +80,18 @@ case "$1" in
                RETVAL=$?
        else
                # show "%s service is not running." eagle
-               msg_not_running eagle
-               RETVAL=1
+               msg_not_running eagle >&2
+               RETVAL=7
        fi
        ;;
-  force-reload)
-       # if program allows reloading without stopping
-       $0 reload
-
-       # or if it doesn't
-       $0 stop && $0 start
-       ;;
   status)
        status eagle
        RETVAL=$?
-        ;;
+       ;;
   *)
-        # show "Usage: %s {start|stop|status|restart|reload|force-reload}" $0
+       # show "Usage: %s {start|stop|status|restart|reload|force-reload}" $0
        msg_usage "$0 {start|stop|status|restart|reload|force-reload}"
-        exit 1
+       exit 3
 esac
 
 exit $RETVAL
This page took 0.117771 seconds and 4 git commands to generate.