#!/bin/sh . /etc/rc.d/functions.rc . /etc/rc.conf case "$1" in start) for n in $NETWORKS ; do status_begin starting $n network /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 status_begin starting $n network /sbin/ifdown $n status_check done ;; restart) $0 stop && sleep 1 && $0 start ;; status) exit 0 ;; *) echo "usage: $0 {start | stop | restart | status }" exit 1 esac exit $?