Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 29601 Details for
Bug 48305
Backup/alternate static ip configuration for dhcp failure (ala Windows XP)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
net.eth0 patch file
altIfconfig.patch (text/plain), 3.34 KB, created by
Kent Hulick
on 2004-04-19 03:41:42 UTC
(
hide
)
Description:
net.eth0 patch file
Filename:
MIME Type:
Creator:
Kent Hulick
Created:
2004-04-19 03:41:42 UTC
Size:
3.34 KB
patch
obsolete
>*** ._cfg0000_net.eth0 Sun Apr 18 16:06:28 2004 >--- net.eth0 Sun Apr 18 16:08:56 2004 >*************** >*** 33,44 **** > # setup_vars: setup variables based on $1 and content of /etc/conf.d/net > # The following variables are set, which should be declared local by > # the calling routine. >! # status_IFACE (up or '') >! # vlans_IFACE (space-separated list) >! # ifconfig_IFACE (array of ifconfig lines, replaces iface_IFACE) >! # dhcpcd_IFACE (command-line args for dhcpcd) >! # routes_IFACE (array of route lines) >! # inet6_IFACE (array of inet6 lines) > setup_vars() { > local i iface="${1//\./_}" > >--- 33,45 ---- > # setup_vars: setup variables based on $1 and content of /etc/conf.d/net > # The following variables are set, which should be declared local by > # the calling routine. >! # status_IFACE (up or '') >! # vlans_IFACE (space-separated list) >! # ifconfig_IFACE (array of ifconfig lines, replaces iface_IFACE) >! # dhcpcd_IFACE (command-line args for dhcpcd) >! # routes_IFACE (array of route lines) >! # inet6_IFACE (array of inet6 lines) >! # ifconfig_alt_IFACE (alternate ifconfig) > setup_vars() { > local i iface="${1//\./_}" > >*************** >*** 48,53 **** >--- 49,55 ---- > eval dhcpcd_IFACE=\"\$\{dhcpcd_$iface\}\" > eval routes_IFACE=( \"\$\{routes_$iface\[@\]\}\" ) > eval inet6_IFACE=( \"\$\{inet6_$iface\[@\]\}\" ) >+ eval ifconfig_alt_IFACE=( \"\$\{ifconfig_alt_$iface\[@\]\}\" ) > > # BACKWARD COMPATIBILITY: populate the ifconfig_IFACE array > # if iface_IFACE is set (fex. iface_eth0 instead of ifconfig_eth0) >*************** >*** 91,103 **** > /sbin/ifconfig ${IFACE} &>${devnull} > eend $? || return $? > else >- # Check that eth0 was not brought up by the kernel ... > if [[ ${status_IFACE} == up ]]; then > einfo "Keeping kernel configuration for ${IFACE}" > else > ebegin "Bringing ${IFACE} up via DHCP" > /sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE} >! eend $? || return $? > fi > # Show address retrieved > i=$(ifconfig ${IFACE} | grep -m1 -o 'inet addr:[^ ]*' | cut -d: -f2) >--- 93,126 ---- > /sbin/ifconfig ${IFACE} &>${devnull} > eend $? || return $? > else > if [[ ${status_IFACE} == up ]]; then > einfo "Keeping kernel configuration for ${IFACE}" > else > ebegin "Bringing ${IFACE} up via DHCP" > /sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE} >! eend $? || { >! # if dhcp failed, try the alternate config >! if [ -n "${ifconfig_alt_IFACE}" ] >! then >! einfo "DHCP failed, Using alternate configuration for ${IFACE}" >! /sbin/ifconfig ${IFACE} ${ifconfig_alt_IFACE} >/dev/null || { >! retval=$? >! eend ${retval} "Failed to bring ${IFACE} up" >! return ${retval} >! } >! # ifconfig does not always return failure .. >! /sbin/ifconfig ${IFACE} &> /dev/null || { >! retval=$? >! eend ${retval} "Failed to bring ${IFACE} up" >! return ${retval} >! } >! else >! retval=$? >! eend ${retval} "Failed to bring ${IFACE} up" >! return ${retval} >! fi >! } > fi > # Show address retrieved > i=$(ifconfig ${IFACE} | grep -m1 -o 'inet addr:[^ ]*' | cut -d: -f2)
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 48305
:
29601
|
30890