aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig')
-rwxr-xr-xsysconfig/network-scripts/ifup-eth20
1 files changed, 2 insertions, 18 deletions
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 2aead689..43d7ca3a 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -168,27 +168,11 @@ if [ -n "${BRIDGE}" -a -x /usr/sbin/brctl ]; then
fi
if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then
- # Remove any temporary references which were previously added to dhclient config
- if [ -w /etc/dhclient-${DEVICE}.conf ] ; then
- LC_ALL=C grep -v "# temporary RHL ifup addition" /etc/dhclient-${DEVICE}.conf > /etc/dhclient-${DEVICE}.conf.ifupnew 2> /dev/null
- cat /etc/dhclient-${DEVICE}.conf.ifupnew > /etc/dhclient-${DEVICE}.conf
- rm -f /etc/dhclient-${DEVICE}.conf.ifupnew
- fi
if [[ "${PERSISTENT_DHCLIENT}" = [yY1]* ]]; then
ONESHOT="";
else
ONESHOT="-1";
fi;
- if [ -n "${DHCP_HOSTNAME}" ]; then
- # Send a host-name to the DHCP server (requ. by some dhcp servers).
- if [ -w /etc/dhclient-${DEVICE}.conf ] ; then
- if ! LC_ALL=C grep "send *host-name *\"${DHCP_HOSTNAME}\"" /etc/dhclient-${DEVICE}.conf > /dev/null 2>&1 ; then
- echo "send host-name \"${DHCP_HOSTNAME}\"; # temporary RHL ifup addition" >> /etc/dhclient-${DEVICE}.conf
- fi
- elif ! [ -e /etc/dhclient-${DEVICE}.conf ] ; then
- echo "send host-name \"${DHCP_HOSTNAME}\"; # temporary RHL ifup addition" >> /etc/dhclient-${DEVICE}.conf
- fi
- fi
# allow users to use generic '/etc/dhclient.conf' (as documented in manpage!)
# if per-device file doesn't exist or is empty
if [ -s /etc/dhclient-${DEVICE}.conf ]; then
@@ -203,7 +187,7 @@ if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then
[ -x /sbin/restorecon ] && restorecon /var/lib/dhclient/dhclient-${DEVICE}.leases > /dev/null 2>&1
fi
done
- DHCLIENTARGS="${DHCLIENTARGS} ${ONESHOT} -q ${DHCLIENTCONF} -lf /var/lib/dhclient/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid"
+ DHCLIENTARGS="${DHCLIENTARGS} ${DHCP_HOSTNAME:+-H $DHCP_HOSTNAME} ${ONESHOT} -q ${DHCLIENTCONF} -lf /var/lib/dhclient/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid"
echo
echo -n $"Determining IP information for ${DEVICE}..."
if [[ "${PERSISTENT_DHCLIENT}" != [yY1]* ]] && check_link_down ${DEVICE}; then
@@ -306,7 +290,7 @@ fi
# IPv6 initialisation?
/etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}
if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -x /sbin/dhclient ]; then
- /sbin/dhclient -6 ${DHCPV6C_OPTIONS} ${DEVICE} -lf /var/lib/dhclient/dhclient6-${DEVICE}.leases -pf /var/run/dhclient6-${DEVICE}.pid
+ /sbin/dhclient -6 ${DHCPV6C_OPTIONS} -lf /var/lib/dhclient/dhclient6-${DEVICE}.leases -pf /var/run/dhclient6-${DEVICE}.pid ${DHCP_HOSTNAME:+-H $DHCP_HOSTNAME} ${DEVICE}
fi
if [ "${IPX}" = yes ]; then