#!/bin/sh # # network setup script # Copyright (c) by Shuu Yamaguchi # Can be freely distributed and used under the terms of the GNU GPL. # # network start|stop # # This script can be used until usbmgr 0.4.3. # #!/bin/sh DEV=`grep eth /proc/net/dev | cut -d : -f 1` for dev in $DEV do case $1 in start) ifconfig $dev | grep UP if [ $? != 0 ];then /sbin/ifup $dev fi ;; stop) ifconfig $dev | grep UP if [ $? = 0 ];then /sbin/ifdown $dev fi ;; esac done