]> pd.if.org Git - startuptools/commitdiff
improve reporting of network startup
authorNathan Wagner <nw@hydaspes.if.org>
Tue, 28 May 2013 06:30:41 +0000 (06:30 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Tue, 28 May 2013 06:30:41 +0000 (06:30 +0000)
scripts/network

index 4e7040b1c05c2239018cf5597fe7b2775f212657..df0a8230b87cf9be6e83b3a3739fa8dd376733e7 100755 (executable)
@@ -1,24 +1,27 @@
 #!/bin/sh
 
 #!/bin/sh
 
+. /etc/rc.d/functions.rc
 . /etc/rc.conf
 
 case "$1" in 
        start)
                for n in $NETWORKS ; do
 . /etc/rc.conf
 
 case "$1" in 
        start)
                for n in $NETWORKS ; do
+                       status_begin starting $n network
                        /sbin/ifup $n
                        /sbin/ifup $n
+                       status_check
                done
                ;;
        stop)
                # NETWORKS might have changed
                # TODO record the network somewhere under /var/run/startuptools
                for n in $NETWORKS ; do
                done
                ;;
        stop)
                # NETWORKS might have changed
                # TODO record the network somewhere under /var/run/startuptools
                for n in $NETWORKS ; do
+                       status_begin starting $n network
                        /sbin/ifdown $n
                        /sbin/ifdown $n
+                       status_check
                done
                ;;
        restart)
                done
                ;;
        restart)
-               $0 stop
-               sleep 1
-               $0 start
+               $0 stop && sleep 1 && $0 start
                ;;
        status)
                exit 0
                ;;
        status)
                exit 0
@@ -27,3 +30,5 @@ case "$1" in
                echo "usage: $0 {start | stop | restart | status }"
                exit 1
 esac
                echo "usage: $0 {start | stop | restart | status }"
                exit 1
 esac
+
+exit $?