Here is the patch created as requested. BW
--- blfs-bootscripts-6.1/blfs/sysconfig/network-devices/services/dhcpcd
2005-08-01 19:29:19.000000000 +0000
+++ /etc/sysconfig/network-devices/services/dhcpcd 2006-08-23
03:37:01.000000000 +0000
@@ -4,9 +4,10 @@
# Based upon lfs-bootscripts-1.12 $network_devices/if{down,up}
# Rewritten by Nathan Coulson <[EMAIL PROTECTED]>
# Adapted for dhcpcd by DJ Lucas <[EMAIL PROTECTED]>
+# Modified by Brian Weber to handle absent carrier on interface.
-#$LastChangedBy: bdubbs $
-#$Date: 2005-08-01 13:29:19 -0600 (Mon, 01 Aug 2005) $
+#$LastChangedBy: bweber $
+#$Date: 2006-08-22 20:02:00 -0500 (Tue, 22 Aug 2006) $
. /etc/sysconfig/rc
. $rc_functions
@@ -15,6 +16,15 @@
PIDFILE="/var/run/dhcpcd-$1.pid"
LEASEINFO="/var/lib/dhcpc/dhcpcd-$1.info"
+# Abort startup and issure warning if interface lacks a carrier.
+link_status=`ip link show ${1} 2> /dev/null`
+if [ "$2" = "up" ] && echo $link_status | grep -q "NO-CARRIER" ; then
+ boot_mesg "Skipping startup of dhcpcd: '${1}' NO-CARRIER!"
+${WARNING}
+ echo_warning
+ exit 0
+else
+
case "$2" in
up)
boot_mesg -n "Starting dhcpcd on the $1 interface..."
@@ -84,7 +94,7 @@
echo ""
echo_ok
elif [ "$RET" -eq 1 ]; then
- boot_mesg "dhcpcd not running!" ${WARNING}
+ boot_mesg " (dhcpcd not running}" ${WARNING}
echo_warning
else
echo ""
@@ -109,4 +119,6 @@
;;
esac
+fi
+
# End $network_devices/services/dhcpcd
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page