[CentOS] Mount USB disk at startup?
Mogens Kjaer
mk at crc.dk
Thu Feb 4 14:57:22 UTC 2010
On 02/04/2010 03:36 PM, Robert Nichols wrote:
...
> Be sure to put a timeout in that loop lest it hang
> forever if that external device is absent.
>
Yes, I have added the following:
for (( times = 1; times < 120; times++ )); do
echo Wait for /dev/sdb1 $times
if [ -b /dev/sdb1 ]; then
break;
fi
sleep 1
done
I should perhaps add some more lines that
comments out the /dev/sdb1 line from fstab
if the drive doesn't show up in 120 secs.
Mogens
--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Mobile: +45 22 12 53 25
Email: mk at crc.dk Homepage: http://www.crc.dk
More information about the CentOS
mailing list