stmmac: updated the drv module version
[linux-2.6/kvm.git] / drivers / staging / dt3155 / dt3155.sysvinit
blob92ec0939cb7ace043aeb85b66d6475cae9b97687
1 #! /bin/sh
3 # Module load/unload script for use with SysV-style /etc/init.d/ systems.
4 # On a Debian system, copy this to /etc/init.d/dt3155 and then run
5 # /usr/sbin/update-rc.d dt3155 defaults 55
6 # to create the appropriate /etc/rc?.d/[SK]55dt3155 start/stop links.
7 # (The "55" is arbitrary but is what I use to load this rather late.)
9 # Andy Dougherty Feb 22 2000 doughera@lafayette.edu
10 # Dept. of Physics
11 # Lafayette College, Easton PA 18042
14 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
16 # Edit to point to your local copy.
17 FILE=/usr/local/lib/modules/dt3155/dt3155.o
18 NAME="dt3155"
19 DESC="dt3155 Frame Grabber module"
20 DEV="dt3155"
22 if test ! -f $FILE; then
23 echo "Unable to locate $FILE"
24 exit 0
27 set -e
29 case "$1" in
30 start)
31 echo -n "Loading $DESC "
32 if /sbin/insmod -v -f $FILE; then
33 major=`grep $DEV /proc/devices | awk "{print \\$1}"`
34 rm -f /dev/dt3155?
35 mknod /dev/dt3155a c $major 0
36 mknod /dev/dt3155b c $major 1
37 chmod go+rw /dev/dt3155?
38 echo
39 else
40 echo "$FILE not loaded."
43 stop)
44 echo -n "Unloading $DESC: "
45 if /sbin/rmmod $NAME ; then
46 echo
47 else
48 echo "$DEV not removed"
49 exit 0
51 rm -f /dev/dt3155?
54 echo "Usage: /etc/init.d/$NAME {start|stop}"
55 exit 1
57 esac
59 exit 0