From 88c57f58ecc56c1d2b4580951cd00ec510052dad Mon Sep 17 00:00:00 2001 From: Preston Brown Date: Thu, 8 Jun 2000 21:35:13 +0000 Subject: use dhcpcd if pump fails. --- sysconfig/network-scripts/ifup | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sysconfig/network-scripts/ifup') diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index b9e9357c..c95ad71d 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -52,7 +52,7 @@ if [ "$BOOTP" = "yes" ]; then fi if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then - PUMP=true + DYNCONFIG=true fi OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${DEVICETYPE}" @@ -83,17 +83,22 @@ if [ -n "$MACADDR" ]; then ifconfig ${DEVICE} hw ether ${MACADDR} fi -if [ -n "$PUMP" ]; then +if [ -n "$DYNCONFIG" ]; then PUMPARGS= + DHCPCDARGS= if [ -n "$DHCP_HOSTNAME" ]; then PUMPARGS="-h $DHCP_HOSTNAME" + DHCPCDARGS="-h $DHCP_HOSTNAME" fi if [ -n "$NEEDHOSTNAME" ]; then PUMPARGS="$PUMPARGS --lookup-hostname" + DHCPCDARGS="$DHCPCDARGS -H" fi echo -n "Determining IP information for $DEVICE..." if /sbin/pump $PUMPARGS -i $DEVICE ; then echo " done." + else if /sbin/dhcpcd $DHCPCDARGS $DEVICE ; then + echo " done." else echo " failed." exit 1 -- cgit v1.2.1