1 #!/bin/sh
2 module="shortprint"
3 device="shortprint"
4 mode="666"
5
6 # Group: since distributions do it differently, look for wheel or use staff
7 if grep '^staff:' /etc/group > /dev/null; then
8 group="staff"
9 else
10 group="wheel"
11 fi
12
13
14 # invoke insmod with all arguments we got
15 # and use a pathname, as newer modutils don't look in . by default
16 /sbin/insmod -f ./$module.ko $* || exit 1
17
18 major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`
19
20 # Create 8 entry points, as SHORT_NR_PORTS is 8 by default
21 rm -f /dev/${device}
22 mknod /dev/${device} c $major 0
23
24 chgrp $group /dev/${device}
25 chmod $mode /dev/${device}
26
27
28
29
30
31
|
This page was automatically generated by the
LXR engine.
|