short_load
上传用户:wudi5211
上传日期:2010-01-21
资源大小:607k
文件大小:1k
- #!/bin/sh
- module="short"
- device="short"
- group="wheel"
- mode="664"
- # invoke insmod with all arguments we got
- /sbin/insmod -f $module $* || exit 1
- major=`cat /proc/devices | awk "\$2=="$module" {print \$1}"`
- rm -f /dev/${device}[0-3]
- mknod /dev/${device}0 c $major 0
- mknod /dev/${device}1 c $major 1
- mknod /dev/${device}2 c $major 2
- mknod /dev/${device}3 c $major 3
- rm -f /dev/${device}[0-3][ps]
- mknod /dev/${device}0p c $major 16
- mknod /dev/${device}1p c $major 17
- mknod /dev/${device}2p c $major 18
- mknod /dev/${device}3p c $major 19
- mknod /dev/${device}0s c $major 32
- mknod /dev/${device}1s c $major 33
- mknod /dev/${device}2s c $major 34
- mknod /dev/${device}3s c $major 35
- rm -f /dev/${device}int
- mknod /dev/${device}int c $major 128
- chgrp $group /dev/${device}[0-3] /dev/${device}[0-3][ps] /dev/${device}int
- chmod $mode /dev/${device}[0-3] /dev/${device}[0-3][ps] /dev/${device}int