#2185: Check carrier status in DHCP client scripts
---------------------------------------------+------------------------------
Reporter: [EMAIL PROTECTED] | Owner: [EMAIL PROTECTED]
Type: enhancement | Status: assigned
Priority: normal | Milestone: future
Component: BOOK | Version: SVN
Severity: normal | Resolution:
Keywords: network |
---------------------------------------------+------------------------------
Comment (by [EMAIL PROTECTED]):
What is the status on this one? Seems a fairly simple modification as
long as the /sys method tests reliably on several devices. Actually, come
to think of it, this should probably be done in the ifup script in LFS.
I'm not sure if this would affect Bruce's wireless scripts however. It'd
have to wait until after the 6.3 release, but this or something similar
looks well in my ifup (pardon the fake diff):
+ # Only process the config file if the device is actually
connected
+ # to media.
+ if [ "`cat /sys/class/net/${1}/carrier`" = 1 ]
+ then
- IFCONFIG=${file} ${NETWORK_DEVICES}/services/${SERVICE} ${1}
up
+ IFCONFIG=${file} ${NETWORK_DEVICES}/services/${SERVICE}
${1} up
+ else
+ echo -e "${WARNING} The ${1} device has no
connection!"
+ echo -en "${CURS_UP}"
+ log_warning_msg
+ fi
--
Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/2185#comment:3>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page