#!/bin/bash #/etc/rc.d/rc.firewire # initialise firewire modules #the order seems to be important here, at least for removal #(for install, doesn't matter) drivers="eth1394 raw1394 sbp2 video1394 dv1394 amdtp cmp ohci1394 ieee1394" #---------------------- firewire_start() { echo -n "firewire " for driver in $drivers do echo -n "$driver " /sbin/modprobe $driver done echo "" } firewire_stop() { #any disks mounted? for driver in $drivers do /sbin/rmmod $driver #sleep 1 done } firewire_restart() { firewire_stop sleep 2 firewire_start } case "$1" in 'start') firewire_start ;; 'stop') firewire_stop ;; 'restart') firewire_restart ;; *) echo "usage $0 start|stop|restart" esac #---------------------------------