diff options
Diffstat (limited to 'linux/mkdev.sh')
| -rwxr-xr-x | linux/mkdev.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/linux/mkdev.sh b/linux/mkdev.sh new file mode 100755 index 0000000..d1393e6 --- /dev/null +++ b/linux/mkdev.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +major=53 +if [ $# -gt 0 ]; then + major=$1 +fi + +prefix=/dev/chuda +if [ $# -gt 1 ]; then + prefix=$2 +fi + +rm -f ${prefix}* +mknod "${prefix}" b $major 0 +for i in $(seq 1 20); do + mknod "${prefix}${i}" b $major $i +done + +chown root:disk ${prefix}* |
