I have zero knolwedge of scripting but I have had a go at combining joosy and mgillespies scripts to meet my needs.
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: wait4usbdisks
# Required-Start: checkfs
# Required-Stop:
# Should-Start:
# Should-stop:
# Default-Start: S
# Default-Stop:
# X-Interactive: true
# Short-Description: Delays boot to ensure USB disks are connected.
### END INIT INFO
#
# If /etc/fstab has been configured to mount a USB drive, pause to give
# the USB drive devices time to show up in /dev. If this is not done,
# checkfs.sh will fail, requiring manual intervention...
#
. /lib/lsb/init-functions
case "$1" in
start)
FS=`grep "^UUID" /etc/fstab | sed 's/^UUID=\([a-z0-9-]*\).*$/\/dev\/disk\/by-uuid\/\1/i'`
for f in $FS ;
do
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
[ -h $f ] && continue 2
sleep 1
done
exit 1
;;
stop)
;;
esac
Does this look like it might work?
Also as I am running this from rcconf as suggested by mgillespie can I delete restamp's symlink?
Code:
# ln -s ../init.d/wait4usbdisks /etc/rcS.d/S25wait4usbdisks
Any feedback gratefully received.




