#! /bin/bash
set -x

DEV=ad
FILE=$DEV.o

/sbin/insmod $FILE $* || { echo $FILE not installed; exit 1 }

major=`grep $DEV /proc/devices | awk "{print \\$1}"`

for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
do
  rm -f /dev/ad$i
  mknod /dev/ad$i c $major $i
  chmod a+rw /dev/ad$i
done

ls -al /dev/ad[0-9] /dev/ad1[0-5]

