15 lines
225 B
Bash
Executable File
15 lines
225 B
Bash
Executable File
#!/bin/sh
|
|
|
|
module="scream"
|
|
mode="666"
|
|
|
|
/sbin/insmod ./$module.ko "$@" || exit 1
|
|
|
|
rm -f /dev/${module}
|
|
|
|
major=$(awk "\$2==\"$module\" {print \$1}" /proc/devices)
|
|
|
|
mknod /dev/${module}0 c "$major" 0
|
|
|
|
chmod $mode /dev/${module}
|