From: Heiko Z. <smi...@us...> - 2004-03-20 17:26:10
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18981/scripts/scripts Added Files: eagle-usb Log Message: initial checkin of eagle-usb --- NEW FILE: eagle-usb --- #!/bin/bash # # $Source: /cvsroot/devil-linux/build/scripts/scripts/eagle-usb,v $ # $Revision: 1.1 $ # $Date: 2004/03/20 17:16:10 $ # # http://www.devil-linux.org # ### BEGIN INIT INFO # Provides: eagle-usb # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: 3 5 # Default-Stop: 0 6 # Description: bring up eagle-usb based modem ### END INIT INFO # # Include the functions declared in the /etc/init.d/functions file # and the variables from the /etc/sysconfig/network file. # source /etc/init.d/functions # parameters CONFIGNAME=EAGLE_USB eval START=\$START_$CONFIGNAME # Determine the base and follow a runlevel link name. base=${0##*/} link=${base#*[SK][0-9][0-9]} # Force execution if not called by a runlevel directory. test $link = $base && START=yes test "$START" = "yes" || exit 0 case "$1" in start) # mount usb file system if not already done if [ ! -f /proc/bus/usb/devices ]; then mount -t usbdevfs usbdevfs /proc/bus/usb fi sleep 1 echo "Configuring eagle usb based modem" modprobe eagle-usb sleep 1 # configure eagle usb modem eaglectrl -w # get intefarce name int=$(eaglectrl -i) echo "Eagle usb based modem configured on: $int" ;; stop) echo "Deconfiguring eagle usb based modem" int=$(eaglectrl -i) /sbin/ifconfig $int down rmmod eagle-usb ;; restart) $0 stop sleep 1 $0 start ;; *) echo "Usage: $0 {start|stop|restart} " exit 1 ;; esac |