From aa0105707a1f72bd00b893fc4466c1b588390371 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 15 Apr 2005 20:21:50 +0000 Subject: automatically send hostname if it's available and not overridden (#149667) --- sysconfig/network-scripts/ifup-eth | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sysconfig/network-scripts') diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 63b1e1e3..c5ca4572 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -141,6 +141,9 @@ if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then else ONESHOT="-1"; fi; + if ! need_hostname && [ -z "${DHCP_HOSTNAME}" ]; then + DHCP_HOSTNAME=`hostname` + 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 -- cgit v1.2.1