[Bug 132925] initscripts use old ifconfig instead of iproute2

bugzilla at redhat.com bugzilla at redhat.com
Thu Apr 3 17:55:21 UTC 2008


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: initscripts use old ifconfig instead of iproute2


https://bugzilla.redhat.com/show_bug.cgi?id=132925





------- Additional Comments From tcallawa at redhat.com  2008-04-03 13:55 EST -------
Looking at the cases where ifconfig shows up:

1. in sysconfig/network-scripts/network-functions (in check_device_down() ):

The ifconfig call is conditionalized so that it is only used for virtual devices
(aka, where the device name contains a :). I wonder if this is a failure of ip
to detect those devices correctly.

2. in sysconfig/network-scripts/network-functions-ipv6:

There is a function (ipv6_exec_ifconfig()) which calls ifconfig, but I can't see
anything that calls it.

3. in sysconfig/network-scripts/ifup-iucv

This diff takes care of most of it, but ip doesn't understand netmask in the
same way that ifconfig does:

@@ -27,7 +27,8 @@ fi
 
 echo "$PEERID" > /sys/bus/iucv/drivers/netiucv/connection 2>/dev/null
 
-ifconfig ${DEVICE} ${IPADDR} ${opts} pointopoint ${GATEWAY} netmask ${NETMASK}
+ip link set ${DEVICE} up ${opts}
+ip addr add dev ${DEVICE} ${IPADDR}/${NETMASK} peer ${GATEWAY}
 if [ "${NETWORK}" != "" ] ; then
 	route add -host ${GATEWAY} metric 1 ${DEVICE}
 fi

We'd also need to change NETMASK in /etc/sysconfig/network-devices/ifconfig.eth* :
from 255.255.255.255 to 32
 ..  255.255.255.0   to 24
 ..  255.255.0.0     to 16
 ..  255.0.0.0       to 8

This is a rather significant, and backwards incompatible change. We could
probably parse the NETMASK field first, but I'll leave that to others to determine.

Also, all of the route command calls probably need to be replaced with "ip
route" calls. There are quite a few of them.

sysconfig/network-scripts/ifup-plip, sysconfig/network-scripts/ifup-ctc,
sysconfig/network-scripts/ifup-ippp and sysconfig/network-scripts/ifup-plusb all
need (basically) the same set of changes.

4. in sysconfig/network-scripts/ifup-aliases

The first time it shows up... well, I can't tell you what ifconfig is doing there.
The second and third time it appears, its dropping a virtual/child interface
(aka, a device with a : in its name).
The fourth time is setting netmask, see above comments.
The fifth time also sets netmask, same as above.
The sixth is the same as the second and third appearances.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the fedora-triage-list mailing list