📄 short_load
字号:
#!/bin/shmodule="short"device="short"mode="664"# Group: since distributions do it differently, look for wheel or use staffif grep '^staff:' /etc/group > /dev/null; then group="staff"else group="wheel"fi# invoke insmod with all arguments we got# and use a pathname, as newer modutils don't look in . by default/sbin/insmod -f ./$module.o $* || exit 1major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`# Create 8 entry points, as SHORT_NR_PORTS is 8 by defaultrm -f /dev/${device}[0-7]mknod /dev/${device}0 c $major 0mknod /dev/${device}1 c $major 1mknod /dev/${device}2 c $major 2mknod /dev/${device}3 c $major 3mknod /dev/${device}4 c $major 4mknod /dev/${device}5 c $major 5mknod /dev/${device}6 c $major 6mknod /dev/${device}7 c $major 7rm -f /dev/${device}[0-3][ps]mknod /dev/${device}0p c $major 16mknod /dev/${device}1p c $major 17mknod /dev/${device}2p c $major 18mknod /dev/${device}3p c $major 19mknod /dev/${device}4p c $major 20mknod /dev/${device}5p c $major 21mknod /dev/${device}6p c $major 22mknod /dev/${device}7p c $major 23mknod /dev/${device}0s c $major 32mknod /dev/${device}1s c $major 33mknod /dev/${device}2s c $major 34mknod /dev/${device}3s c $major 35mknod /dev/${device}4s c $major 36mknod /dev/${device}5s c $major 37mknod /dev/${device}6s c $major 38mknod /dev/${device}7s c $major 39rm -f /dev/${device}int /dev/${device}printmknod /dev/${device}int c $major 128mknod /dev/${device}print c $major 129chgrp $group /dev/${device}[0-7] /dev/${device}[0-7][ps] /dev/${device}intchmod $mode /dev/${device}[0-7] /dev/${device}[0-7][ps] /dev/${device}int
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -