Blame | Last modification | View Log | RSS feed
#!/bin/sh
#
# a simple shell script to load the pcicc32 driver module
# and to install the associated device files (Hi, 2004)
#
# $Log: pcicc32_load,v $
# Revision 1.4 2004/08/13 19:34:36 klaus
# Changed to support kernels 2.6 and lesser
#
#
module="pcicc32"
device="cc32_"
group="root"
mode="666"
# the modulenumber must be given
if test $1
then
# invoke insmod - use 'insmod -f' if the kernel did not match exactly
/sbin/insmod $module.ko || /sbin/insmod $module.o || exit 1
# get major number from /proc/devices
major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`
rm -f /dev/${device}$1
echo mknod /dev/${device}$1 c $major $1
mknod /dev/${device}$1 c $major $1
chgrp $group /dev/${device}$1
chmod $mode /dev/${device}$1
else
echo "usage: pcicc32_load module_number"
fi