#! /bin/sh
# Silly wrapping of insmod to allow dynamic major numbers
#

FILE="ceddrv.o"
DEV="ced1401"

# print messages

tail -0 -f /var/adm/messages &

/sbin/insmod -f $FILE $* || (sleep 1; killall tail; exit 1) || exit 1

killall tail

#make nodes
cd /dev
rm -f ced0 ced1

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

mknod ced0    c $major 0
mknod ced1    c $major 1
mknod ced2    c $major 2
mknod ced3    c $major 3


