Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 32079 Details for
Bug 34484
[PATCH] sys-apps/ifplugd doesn't work with dhcp (net.eth0)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
/etc/init.d/ifplugdupdown.sh, contains ifpulgd_preup and ifplugd_postdown
ifplugdupdown.sh (text/plain), 2.72 KB, created by
derf
on 2004-05-26 09:00:19 UTC
(
hide
)
Description:
/etc/init.d/ifplugdupdown.sh, contains ifpulgd_preup and ifplugd_postdown
Filename:
MIME Type:
Creator:
derf
Created:
2004-05-26 09:00:19 UTC
Size:
2.72 KB
patch
obsolete
>#!/sbin/runscript >#NB: Config is in /etc/conf.d/ifplugd > >#From /etc/init.d/net.eth0: >if [[ -n "$NET_DEBUG" ]]; then > set -x > devnull=/dev/stderr >else > devnull=/dev/null >fi > >#From /etc/init.d/net.eth0: ># Fix bug 50039 (init.d/net.eth0 localization) ># Some other commands in this script might need to be wrapped, but ># we'll get them one-by-one. Note that LC_ALL trumps LC_anything_else ># according to locale(7) >ifconfig() { > LC_ALL=C /sbin/ifconfig "$@" >} > ># ifplugd_preup: If the interface is being managed by ifplugd, then it has ># been left up, but unconfigured. We bring it down here to ensure that it gets ># assigned the proper default IPV6 address and to ensure that it gets ># configured properly. >ifplugd_preup() { > local IFACE=${1} status_iface > # Unlike status_IFACE in net.eth0, for ifplugd interfaces, they are > # only considered up if they have an address. We check here for such > # interfaces and leave them up if they are already configured. > status_iface="$(ifconfig ${1} 2>${devnull} | \ > gawk '/addr:/{a=1}/ UP /{ if (a == 1) print "up"}')" > if [[ status_iface != "up" && -r /etc/conf.d/ifplugd && \ > -x /etc/init.d/ifplugd ]] && service_started ifplugd ; then > . /etc/conf.d/ifplugd > if [[ "${INTERFACES}" = "auto" || \ > "${INTERFACES/.*${IFACE}.*}" = "${IFACE}" ]] ; then > if [[ "${2}" != "-q" ]] ; then > ebegin "Taking ${IFACE} down to be configured" > fi > ifconfig ${IFACE} down > if [[ "${2}" != "-q" ]] ; then > eend $? > fi > fi > fi >} > ># ifplugd_postdown: After an interface is brought down, if the interface is ># being managed by ifplugd, and ifplugd is running, then we leave it up, but ># unconfigured, so that ifplugd can receive events from it. >ifplugd_postdown() { > local IFACE="${1}" inet6 x > if [[ -r /etc/conf.d/ifplugd && -x /etc/init.d/ifplugd ]] && \ > service_started ifplugd ; then > . /etc/conf.d/ifplugd > if [[ "${INTERFACES}" = "auto" || \ > "${INTERFACES/.*${IFACE}.*}" = "${IFACE}" ]] ; then > > if [[ "${2}" != "-q" ]] ; then > ebegin "Bringing ${IFACE} up unconfigured to \ >listen for link beat events" > fi > ifconfig "${IFACE}" 0.0.0.0 > ifconfig "${IFACE}" up > > # Delete the default inet6 address for this interface. > inet6="$(ifconfig ${IFACE} | \ > awk '$1 == "inet6" {print $3}')" > if [[ -n "${inet6}" ]]; then > for x in ${inet6}; do > ifconfig "${IFACE}" inet6 del "${x}" > done > fi > > if [[ "${2}" != "-q" ]] ; then > # Report success if the interface is up. > [[ "$(ifconfig ${IFACE} 2>${devnull} | \ > gawk '$1 == "UP" {print "up"}')" = "up" ]] > eend $? > fi > fi > fi >}
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 Raw
Actions:
View
Attachments on
bug 34484
:
21341
|
30710
| 32079 |
32080
|
37685