[BLFS Trac] #2185: Check carrier status in DHCP client scripts

BLFS Trac trac at linuxfromscratch.org
Tue Aug 21 22:23:45 PDT 2007


#2185: Check carrier status in DHCP client scripts
---------------------------------------------+------------------------------
 Reporter:  dnicholson at linuxfromscratch.org  |        Owner:  dnicholson at linuxfromscratch.org
     Type:  enhancement                      |       Status:  assigned                       
 Priority:  normal                           |    Milestone:  future                         
Component:  BOOK                             |      Version:  SVN                            
 Severity:  normal                           |   Resolution:                                 
 Keywords:  network                          |  
---------------------------------------------+------------------------------
Comment (by dj at linuxfromscratch.org):

 {{{

 +            # 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:4>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch



More information about the blfs-book mailing list