#!/bin/sh module="tassiv_camera" device="camera" dir="tassiv" mode="664" # Group: since distributions do it differently, look for wheel or use staff if grep '^staff:' /etc/group > /dev/null; then group="staff" else group="wheel" fi # invoke insmod with all arguments we got # and use a pathname, as newer modutils don't look in . by default /sbin/insmod -f ./$module.o $* || exit 1 major=`cat /proc/devices | awk "\\$2==\"$device\" {print \\$1}"` # Create 8 entry points, as SHORT_NR_PORTS is 8 by default rm -f /dev/${dir}/camera* mknod /dev/${dir}/camera_test c $major 0 mknod /dev/${dir}/camera_isa c $major 1 mknod /dev/${dir}/camera_ecp c $major 2 chgrp -R $group /dev/${dir} chmod -R $mode /dev/${dir} chmod 755 /dev/${dir}