#!/bin/bash # FireWire probing utility © 2001 Olivier Reisch - doctomoe@imaclinux.net # Feel free to copy, modify and/or redistribute this program # provided you don't remove this header and give proper credit. cnt=0 fail=0 if [[ $1 == "" ]] then echo "No target device specified. Should be sda, sdb, sdc, etc., depending on the number of SCSI devices you already have attached." fail=1 fi if [ $fail = 0 ] then echo "Probing FireWire ports..." until pdisk -l /dev/$1 2>/dev/null | grep "artition map" >/dev/null || [ $fail = 1 ] do if (( $cnt > 0 )) then echo "Try $cnt failed..." echo "Probing FireWire ports..." fi let "cnt += 1" rmmod sbp2 rmmod ohci1394 rmmod ieee1394 modprobe sbp2 sleep 2 if (( $cnt > 4 )) then echo "Try $cnt failed..." fail=1 fi done if [ $fail = 1 ] then echo "Failed to load any devices... Please make sure a FW device is plugged in and powered and try again." else echo "FireWire device attached to $1, partition map follows:" pdisk -l /dev/$1 fi fi