#!/bin/sh # # Load the i-bus device driver module and create it's entries in /dev. # # echo -n -e "\377" > /dev/ibus0 # is non inverting (turns all on) # # echo -n -e "\377" > /dev/ibus1 # is inverting (turns all off) # parameter setup #module="ibus" # use this line if you have done a 'make install' module="./ibus.o" # otherwise use this one. device="ibus" group="sys" mode="666" # invoke insmod with all arguments given to us /sbin/insmod -f $module $* || exit 1 # remove stale nodes rm -f /dev/${device}[0-7] major=`cat /proc/devices | awk "\\$2==\"$device\" {print \\$1}"` mknod /dev/${device}0 c $major 0 mknod /dev/${device}1 c $major 1 mknod /dev/${device}2 c $major 2 mknod /dev/${device}3 c $major 3 mknod /dev/${device}4 c $major 4 mknod /dev/${device}5 c $major 5 mknod /dev/${device}6 c $major 6 mknod /dev/${device}7 c $major 7 # give appropriate group/permissions chgrp $group /dev/${device}? chmod $mode /dev/${device}?