ALT Linux Bugzilla
– Attachment 371 Details for
Bug 3893
Optimization is needed for dynamic address assignments when link is down
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Automatic Link detection for dynamic address assignments mode
net-scritps-link-detection.patch (text/plain), 1.23 KB, created by
Alexander Bokovoy
on 2004-03-27 15:43:37 MSK
(
hide
)
Description:
Automatic Link detection for dynamic address assignments mode
Filename:
MIME Type:
Creator:
Alexander Bokovoy
Created:
2004-03-27 15:43:37 MSK
Size:
1.23 KB
patch
obsolete
>--- net-scripts-0.4.3/sysconfig/network-scripts/ifup.orig 2004-03-21 21:31:02 +0200 >+++ net-scripts-0.4.3/sysconfig/network-scripts/ifup 2004-03-27 14:12:51 +0200 >@@ -256,6 +256,11 @@ > ZCIP_ARGS="-s -i $DEVICE" > > if [ -n "$DYNCONFIG" ]; then >+ check_eth_link >+ if [ "$?" = 1 ]; then >+ echo -n "link is down, DHCP discovery is impossible" >+ exit 1 >+ fi > echo -n "Determining IP information for $DEVICE via ${DHCP_CLIENT##*/}..." > if $DHCP_CLIENT $DHCP_ARGS; then > echo " done." >@@ -273,6 +278,11 @@ > exit 1 > fi > elif [ "$BOOTPROTO" = zcip ]; then >+ check_eth_link >+ if [ "$?" = 1 ]; then >+ echo -n "link is down, ZeroConf discovery is impossible" >+ exit 1 >+ fi > echo -n "Determining IP information for $DEVICE via ${ZCIP##*/}..." > if $ZCIP $ZCIP_ARGS; then > echo " done." >--- net-scripts-0.4.3/sysconfig/network-scripts/network-functions.orig 2004-03-21 18:22:47 +0200 >+++ net-scripts-0.4.3/sysconfig/network-scripts/network-functions 2004-03-27 14:11:04 +0200 >@@ -123,3 +123,15 @@ > fi > fi > } >+ >+check_eth_link () >+{ >+ local IFSTATUS >+ local res >+ IFSTATUS=/sbin/ifstatus >+ [ -x $IFSTATUS ] || return 0 >+ $IFSTATUS -q $DEVICE >+ res=$? >+ [ "$res" = 3 ] && return 1 >+ return 0 >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3893
: 371