#!/bin/sh # Modified by Ke Chen to do installation the frame grabber driver module="hrt" device="hrt" mode="664" # Group: since distributions do it differently, look for wheel or use staff if grep -q '^staff:' /etc/group; then group="staff" else group="developer" fi # Load the required modules by modprobe, videodev, v4l2_comman, # v4l1_compat (Not sure v4l1_compat is really needed) # These modules may or may not be needed depending how compile your kernel. /sbin/modprobe videodev /sbin/modprobe videobuf-vmalloc # invoke insmod with all arguments we got # and use a pathname, as insmod doesn't look in . by default /sbin/insmod ./$module.ko $* || exit 1 # retrieve major number #major=$(awk "\$2==\"$module\" {print \$1}" /proc/devices) # Remove stale nodes and replace them, then give gid and perms # Usually the script is shorter, it's scull that has several devices in it. rm -f /dev/${device}[0-4] #mknod /dev/${device} c $major 0 chgrp $group /dev/video0 chmod $mode /dev/video0 chgrp $group /dev/video1 chmod $mode /dev/video1 chgrp $group /dev/video2 chmod $mode /dev/video2