#!/bin/sh

module="mmcdev"
device="mmcdev"
group="root"
mode="664"

# insert the module in executing kernel
/sbin/insmod -f /usr/hpserver/lib/modules/`uname -r`/${module}.o $* || exit 1

# get the major number automatically assigned for us
major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`

# Remove stale nodes and replace them, then give gid and perms
rm -f /dev/${device}
mknod /dev/${device} c $major 0
chgrp $group /dev/${device} 
chmod $mode  /dev/${device}
