aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2002-04-19 16:09:26 +0000
committerBill Nottingham <notting@redhat.com>2002-04-19 16:09:26 +0000
commit3d5af5ca44e1b767f2f86d5a5b0b0d722c9687ca (patch)
tree408ccc3351073abad91fb0908ad33fe50f3e6296 /sysconfig/network-scripts
parentdcf6b34757ccef47ea87e46e226fd96c271c879c (diff)
downloadinitscripts-3d5af5ca44e1b767f2f86d5a5b0b0d722c9687ca.tar
initscripts-3d5af5ca44e1b767f2f86d5a5b0b0d722c9687ca.tar.gz
initscripts-3d5af5ca44e1b767f2f86d5a5b0b0d722c9687ca.tar.bz2
initscripts-3d5af5ca44e1b767f2f86d5a5b0b0d722c9687ca.tar.xz
initscripts-3d5af5ca44e1b767f2f86d5a5b0b0d722c9687ca.zip
back out again
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifup22
1 files changed, 9 insertions, 13 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 98277ab9..219dcfde 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -91,8 +91,6 @@ 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/'`
@@ -104,12 +102,6 @@ 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
@@ -179,10 +171,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
- # static configuration
-
+else
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
@@ -196,6 +188,11 @@ 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
@@ -250,9 +247,8 @@ 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}