Bugzilla – Attachment 63413 Details for
Bug 141554
ifplugd interfaces not started during boot
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Fix returnvalue of ifstatus for STARTMODE=ifplugd
sysconfig-ifstatus.fix_returnvalue_for_ifplugd.141554.diff (text/plain), 2.69 KB, created by
Christian Zoz
on 2006-01-16 10:56:30 UTC
(
hide
)
Description:
Fix returnvalue of ifstatus for STARTMODE=ifplugd
Filename:
MIME Type:
Creator:
Christian Zoz
Created:
2006-01-16 10:56:30 UTC
Size:
2.69 KB
patch
obsolete
>--- scripts/ifplugd-selectif 2005-09-02 16:20:14.000000000 +0000 >+++ scripts/ifplugd-selectif 2006-01-16 09:44:14.000000000 +0000 >@@ -117,6 +117,26 @@ > fi > done > ;; >+ should_be_up) >+ # Checks if an interface which is controlled by ifplugd should >+ # currently be up and running (==> returns 0) >+ ifplugstatus -q $INTERFACE >+ if [ $? -eq 2 ] ; then >+ mesg "`printf " %-9s cable is connected" "$INTERFACE"`" >+ info_mesg "`printf " %-9s has priority %s" "$INTERFACE" "$PRIORITY"`" >+ if [ $PRIORITY -gt 0 ] ; then >+ for IF in $MAJOR; do >+ ifplugstatus -q $IF >+ test $? -eq 2 || continue >+ mesg "`printf " %-9s has lesser priority than '%s'" "$INTERFACE" "$IF"`" >+ exit 1 >+ done >+ fi >+ else >+ mesg "`printf " %-9s no cable connected" "$INTERFACE"`" >+ exit 1 >+ fi >+ ;; > esac > > exit 0 >--- scripts/ifup 2006-01-15 22:21:51.000000000 +0000 >+++ scripts/ifup 2006-01-16 09:50:19.000000000 +0000 >@@ -823,9 +823,31 @@ > fi > > ###################################################################### >-# bringing up/down the interface (main part) >+# bringing up/down or checking the interface (main part) > # > >+# Check status if iflugd first. If ifplugd is running the interface >+# need not to be up always. >+if [ "$SCRIPTNAME" == ifstatus -a "$STARTMODE" == ifplugd ] ; then >+ debug "Checking ifplugd status" >+ ifplugd_retcode=$R_SUCCESS >+ if [ "$HWD_INTERFACETYPE_0" != "wlan" ]; then >+ MESSAGE="`$IFPLUGD -c -i $INTERFACE 2>&1`" >+ test "$?" -ne 0 && ifplugd_retcode=$R_NO_IFPLUGD >+ debug "$MESSAGE" >+ message "`printf " %-9s ifplugd is running" "$INTERFACE"`" >+ fi >+ if ifplugd-selectif $INTERFACE should_be_up; then >+ # if interface should be up and running >+ # then we unset ifplugd_retcode. Then the >+ # normal status section will decide if the >+ # interface is set up correctly >+ if [ $ifplugd_retcode -eq 0 ] ; then >+ unset ifplugd_retcode >+ fi >+ fi >+fi >+ > dhcpretcode=$R_SUCCESS > # switch type. If SKIP_MAIN_PART == skip, don't execute any section > case "$BOOTPROTO$SKIP_MAIN_PART" in >@@ -1173,8 +1195,12 @@ > # returns R_NOTRUNNING while the interface is already UP. This must also be > # passed to rcnetwork, else rcnetwork assumes that the interface is set up > # correctly. (See bug 134899) >-# if [ "$dhcpretcode" = $R_DHCP_BG ] ; then >-if [ "$dhcpretcode" != $R_SUCCESS ] ; then >+# Beside this we have to respect the status of ifplugd for interfaces with >+# STARTMODE=ifplugd. If ifplugd_retcode is set, then this value takes >+# priority over other reurn codes. >+if [ -n "$ifplugd_retcode" ] ; then >+ exithook $ifplugd_retcode >+elif [ "$dhcpretcode" != $R_SUCCESS ] ; then > exithook $R_DHCP_BG > else > if [ "$retcode" = 0 -a -n "$retcode_mtu" -a "$retcode_mtu" != 0 ] ; then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 141554
: 63413