Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 34484 | Differences between
and this patch

Collapse All | Expand All

(-)ifplugd (+20 lines)
Lines 9-14 Link Here
9
9
10
IFPLUGD=/usr/sbin/ifplugd
10
IFPLUGD=/usr/sbin/ifplugd
11
11
12
# Get routines to bring interfaces up/down to listen for events. These are in
13
# /etc/init.d/ifplugdupdown.sh, but /etc/conf.d/net includes some configuration
14
# for them, and SHOULD include ifplugdupdown.sh directly (to add to the preup
15
# and postdown functions). Thus, we just include /etc/conf.d/net directly here.
16
source /etc/conf.d/net
17
if [[ "$(type -t ifplugd_preup)" != function || \
18
 "$(type -t ifplugd_postdown)" != function ]] ; then
19
        eerror "ifplugd functions not defined.
20
You must source /etc/init.d/ifplugdupdown.sh in /etc/conf.d/net"
21
        return 1
22
fi
23
12
[ -z "$INTERFACES" ] && INTERFACES="eth0"
24
[ -z "$INTERFACES" ] && INTERFACES="eth0"
13
[ "$INTERFACES" = "auto" ] && INTERFACES=$(sed -ne 's/.*\<\(eth[0-9]*\):.*/\1/p' /proc/net/dev)
25
[ "$INTERFACES" = "auto" ] && INTERFACES=$(sed -ne 's/.*\<\(eth[0-9]*\):.*/\1/p' /proc/net/dev)
14
26
Lines 62-70 Link Here
62
		iargs="${iargs} $(get_opt ${IF} ARGS '')"
74
		iargs="${iargs} $(get_opt ${IF} ARGS '')"
63
75
64
		echo -n "${IF} "
76
		echo -n "${IF} "
77
#Bring the interface up so we can receive events.
78
		if [ "${action}" = "start" ] ; then
79
		        ifplugd_postdown ${IF} -q
80
		fi
65
		${IFPLUGD} ${dargs} --iface=${IF} ${iargs}
81
		${IFPLUGD} ${dargs} --iface=${IF} ${iargs}
66
		check_success ${IF} ${action} $?
82
		check_success ${IF} ${action} $?
67
		status=$?
83
		status=$?
84
#net.eth0 left the interfaces up for us, so we take them down if requested.
85
		if [ "${action}" = "stop" -a "${SHUTDOWN}" = "yes" ] ; then
86
                        ifplugd_preup ${IF} -q
87
		fi
68
88
69
		[ $status ] || break
89
		[ $status ] || break
70
	done
90
	done

Return to bug 34484