3d2
< TEXTDOMAIN=initscripts
7d5
< . /etc/rc.d/init.d/functions
11c9
< CONFIG=${1}
---
> CONFIG=$1
56,61c54,55
< if [ "${BOOTPROTO}" = bootp -o "${BOOTPROTO}" = dhcp ]; then
<     DYNCONFIG=true
< fi
< 
< if [ -x /sbin/ifup-pre-local ]; then
<     /sbin/ifup-pre-local ${DEVICE}
---
> if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
>     PUMP=true
71c65
< LC_ALL= LANG= /sbin/ifconfig ${REALDEVICE} 2>&1 | grep -s "not found" > /dev/null
---
> /sbin/ifconfig ${REALDEVICE} 2>&1 | grep -s "not found" > /dev/null
91,93d84
< if [ -n "${MTU}" ]; then
<    ifconfig ${DEVICE} mtu ${MTU}
< fi
95,102c86
< # Is there a firewall running, and does it look like one we configured?
< FWACTIVE=
< if [ -f /etc/sysconfig/ipchains -a "`ipchains -L input -n 2>&1 | awk 'END { print NR }'`" -gt 1 ]; then
< 	FWACTIVE=1
< 	export FWACTIVE
< fi
< 			     
< if [ -n "${DYNCONFIG}" ]; then
---
> if [ -n "$PUMP" ]; then
104,130c88,93
<     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
<     if [ "${PEERDNS}" = "no" ]; then
<        PUMPARGS="${PUMPARGS} -d"
<        DHCPCDARGS="${DHCPCDARGS} -R"
<     fi
<     echo -n $"Determining IP information for ${DEVICE}..."
<     
<     # DHCP clients need DNS to be available, and we don't know
<     # what DNS server they're using until they are done.
<     FWHACK=
<     if [ -n "$FWACTIVE" -a "$FIREWALL_MODS" != "no" ]; then
<         ipchains -I input -s 0/0 53 -p udp -j ACCEPT
< 	FWHACK=1
<     fi
<     
<     if [ -x /sbin/pump ] && /sbin/pump ${PUMPARGS} -i ${DEVICE} ; then
< 	echo $" done."
<     elif [ -x /sbin/dhcpcd ] && /sbin/dhcpcd ${DHCPCDARGS} ${DEVICE} ; then
< 	echo $" done."
---
>     if [ -n "$DHCP_HOSTNAME" ]; then
>        PUMPARGS="-h $DHCP_HOSTNAME"
>     fi
>     echo -n "Determining IP information for $DEVICE..."
>     if /sbin/pump $PUMPARGS -i $DEVICE ; then
> 	echo " done."
132,133c95
< 	echo $" failed."
< 	[ -n "$FWHACK" ] && ipchains -D input -s 0/0 53 -p udp -j ACCEPT
---
> 	echo " failed."
136d97
<     [ -n "$FWHACK" ] && ipchains -D input -s 0/0 53 -p udp -j ACCEPT
138,143c99
<     if [ -z "${IPADDR}" ]; then
<          # enable device without IP, useful for e.g. PPPoE
< 	 exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} ${2}
<     fi
<   
<     if [ -z "${NETMASK}" ]; then
---
>     if [ -z "$NETMASK" ]; then
154,160c110,111
<     
<     ifconfig ${DEVICE} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} \
< 	${MTU:+mtu $MTU} \
< 	$(toggle_value arp $ARP) \
< 	$(toggle_value promisc $PROMISC) \
< 	$(toggle_value allmulti $ALLMULTI)
< 	
---
> 
>     ifconfig ${DEVICE} ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} ${ARP:+arp} mtu 1390
165a117,123
>     else
> 	route add -host ${IPADDR} ${DEVICE}
>     fi
> 
>     # this is broken! it's only here for compatibility with old RH systems
>     if [ "${GATEWAY}" != "" -a "${GATEWAY}" != "none" ]; then
> 	route add default gw ${GATEWAY} metric 1 ${DEVICE}
170c128
<     if [ -z "${GATEWAYDEV}" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
---
>     if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
172c130
< 	if [ -n "${GATEWAY}" -a "`ipcalc --network ${GATEWAY} ${NETMASK} 2>/dev/null`" = "NETWORK=${NETWORK}" ]; then
---
> 	if [ "${GATEWAY}" != "" ]; then
