]> pd.if.org Git - startuptools/blob - scripts/network
set up mdev.seq in rc.sysinit
[startuptools] / scripts / network
1 #!/bin/sh
2
3 . /etc/rc.d/functions.rc
4 . /etc/rc.conf
5
6 case "$1" in 
7         start)
8                 for n in $NETWORKS ; do
9                         status_begin starting $n network
10                         /sbin/ifup $n
11                         status_check
12                 done
13                 ;;
14         stop)
15                 # NETWORKS might have changed
16                 # TODO record the network somewhere under /var/run/startuptools
17                 for n in $NETWORKS ; do
18                         status_begin starting $n network
19                         /sbin/ifdown $n
20                         status_check
21                 done
22                 ;;
23         restart)
24                 $0 stop && sleep 1 && $0 start
25                 ;;
26         status)
27                 exit 0
28                 ;;
29         *)
30                 echo "usage: $0 {start | stop | restart | status }"
31                 exit 1
32 esac
33
34 exit $?