#!/bin/sh
MODULE="tracer"
DEVICE="tracer"
GROUP="root"
MODE="664"

# invoke insmod 
/sbin/insmod -f ${MODULE} $* || exit 1

# remove stale nodes
rm -f /dev/${DEVICE}

# look for the major number
MAJOR=`/bin/cat /proc/devices | /usr/bin/awk "\\$2==\"${MODULE}\" {print \\$1}"`

# create the character special file
/bin/mknod /dev/${DEVICE} c ${MAJOR} 0

# set permissions and ownership
/bin/chgrp ${GROUP} /dev/${DEVICE}
/bin/chmod ${MODE}  /dev/${DEVICE}
