June 27, 201313 yr Is it possible to do a go script delay until after the array mounts? IE. #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & ifconfig eth1 up sudo ifconfig eth1 192.168.1.11 sleep until array mounts python /mnt/cache/.custom/sickbeard/Sick-Beard/SickBeard.py
June 27, 201313 yr while ! test -d /mnt/disk1;do sleep 5;done;sleep 10 That code assumes the disk1 slot is populated. You will need to change disk1 to one of your in use slots if you don't have slot 1 filled.
June 27, 201313 yr Another consideration is that is that it's not a pause, it's a halt. Here is what I use for now while [[ ${LOOP:=10} -gt 1 && ! -b /dev/md1 ]] do (( LOOP=LOOP-1 )) echo "Waiting for /dev/md1 to come online ($LOOP)" sleep 1 done sleep 1 This is another version I've been working on. #!/bin/bash [ ${DEBUG:=0} -gt 0 ] && set -x -v declare -a CHAR=('+' 'x'); let i=0 let maxcount=60 DIR=/mnt/disk1 while ! read -n1 -t1 -p "Waiting for ${DIR} press ANY key to stop ($maxcount): [${CHAR[${i}]}]: " do echo -e "\r\c" [[ -d ${DIR} ]] && break [[ $(( maxcount-=1 )) -lt 1 ]] && break [[ $(( i+=1 )) -ge ${#CHAR[@]} ]] && let i=0; done echo echo "maxcount=$maxcount REPLY=${REPLY}"
Archived
This topic is now archived and is closed to further replies.