[launchd-changes] [23859] trunk/launchd/src/rc.netboot
source_changes at macosforge.org
source_changes at macosforge.org
Sat Mar 14 20:33:49 PDT 2009
Revision: 23859
http://trac.macosforge.org/projects/launchd/changeset/23859
Author: dsorresso at apple.com
Date: 2009-03-14 20:33:49 -0700 (Sat, 14 Mar 2009)
Log Message:
-----------
<rdar://problem/6519318> SnowLeopard: Sporadic Failure of XServe Netboot
Modified Paths:
--------------
trunk/launchd/src/rc.netboot
Modified: trunk/launchd/src/rc.netboot
===================================================================
--- trunk/launchd/src/rc.netboot 2009-03-11 23:10:12 UTC (rev 23858)
+++ trunk/launchd/src/rc.netboot 2009-03-15 03:33:49 UTC (rev 23859)
@@ -27,6 +27,8 @@
Failed()
{
echo rc.netboot: $1
+ echo rc.netboot: $1 > /dev/console
+ sleep 5
exit 1
}
@@ -74,11 +76,24 @@
local_mount()
{
- volinfo=`autodiskmount -F 2>/dev/null`
- if [ $? -ne 0 ]; then
- echo "autodiskmount -F found no local drives"
- return 1
- fi
+ tries=0
+ limit=11
+ while [ $tries -lt $limit ]; do
+ tries=$(( tries + 1 ))
+ volinfo=`autodiskmount -F 2>/dev/null`
+ if [ $? -ne 0 ]; then
+ if [ $tries -lt $limit ]; then
+ echo "Waiting for local drives..."
+ echo "Waiting for local drives (retry ${tries}/$(( limit - 1 )))..." > /dev/console
+ sleep 5
+ else
+ echo "autodiskmount -F found no local drives"
+ return 1
+ fi
+ else
+ tries=$limit
+ fi
+ done
set ${volinfo}
devname=$1
fstype=$2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-changes/attachments/20090314/2da82bbb/attachment.html>
More information about the launchd-changes
mailing list