You are here: Home » Reply

Reply To: SUSE 10 startup script

#4469

michaelm

Within the ‘start’ block I added a timeout in case the drive never mounts:


MaxTries=120
count=0;
## Wait for the music cache to appear
while [ ! -e $MUSIC_WATCH_DIR -a $count -lt $MaxTries ]
do
echo "mt-daapd: Waiting for music directory to appear..."
count=$((count+1))
sleep 1
done

if [ ! -e $MUSIC_WATCH_DIR ]; then
echo 'mt-daapd: ERROR: unable to see music directory'
exit 1
fi

Unfortunately, my USB drives don’t show up until sometime later. Any suggestions as to what could be added to the ‘Required-Start’ block to cause this init to run later?

Thanks,

Michael