aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
authorPreston Brown <pbrown@redhat.com>2002-04-17 00:44:50 +0000
committerPreston Brown <pbrown@redhat.com>2002-04-17 00:44:50 +0000
commitfbadc537fbd5ede31bc3793ab4f8a3919a201c97 (patch)
treed329b0b9d5f4c3315500bfde57af310ceb47fc1d /sysconfig
parentba1d3de34745e4f79bec5aa786f527c537d440de (diff)
downloadinitscripts-fbadc537fbd5ede31bc3793ab4f8a3919a201c97.tar
initscripts-fbadc537fbd5ede31bc3793ab4f8a3919a201c97.tar.gz
initscripts-fbadc537fbd5ede31bc3793ab4f8a3919a201c97.tar.bz2
initscripts-fbadc537fbd5ede31bc3793ab4f8a3919a201c97.tar.xz
initscripts-fbadc537fbd5ede31bc3793ab4f8a3919a201c97.zip
bring up the device (ip link set <device> up) after initialization is completed, but before addresses are assigned or DHCP/BOOTP is attempted. This is necessary for some commands (like iwconfig) to work properly.
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup22
1 files changed, 13 insertions, 9 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 219dcfde..98277ab9 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -91,6 +91,8 @@ is_available ${REALDEVICE} || {
exit 0
fi
}
+
+
if [ -n "${HWADDR}" ]; then
FOUNDMACADDR=`LC_ALL= LANG= ip -o link show ${REALDEVICE} | \
sed 's/.*link\/ether \([[:alnum:]:]*\).*/\1/'`
@@ -102,6 +104,12 @@ if [ -n "${HWADDR}" ]; then
fi
fi
+# finished initialization, let's start to bring the device up.
+if ! ip link set ${REALDEVICE} up ; then
+ echo $"Failed to bring up ${DEVICE}."
+ exit 1
+fi
+
# is the device wireless? If so, configure wireless device specifics
is_wireless_device ${DEVICE} && . ./ifup-wireless
@@ -171,10 +179,10 @@ if [ -n "${DYNCONFIG}" ]; then
fi
[ -n "$FWHACK" ] && ipchains -D input -s 0/0 53 -d 0/0 1025:65535 -p udp -j ACCEPT
-else
+else
+ # static configuration
+
if [ -z "${IPADDR}" ]; then
- # enable device without IP, useful for e.g. PPPoE
- ip link set ${REALDEVICE} up
if [ "${NETWORKING_IPV6}" = "yes" ]; then
/etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}
fi
@@ -188,11 +196,6 @@ else
$(toggle_value promisc $PROMISC) \
$(toggle_value allmulti $ALLMULTI)
- if ! ip link set ${REALDEVICE} up ; then
- echo $"Failed to bring up ${DEVICE}."
- exit 1
- fi
-
if ! arping -q -c 2 -w 3 -D -I ${REALDEVICE} ${IPADDR} ; then
echo $"Error, some other host already uses address ${IPADDR}."
exit 1
@@ -247,8 +250,9 @@ if [ "${NETWORKING_IPV6}" = "yes" ]; then
/etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}
fi
+# IPX initialization?
if [ "${IPX}" = yes ]; then
- /etc/sysconfig/network-scripts/ifup-ipx ${DEVICE}
+ /etc/sysconfig/network-scripts/ifup-ipx ${DEVICE}
fi
exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} ${2}