aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-15 20:21:50 +0000
committerBill Nottingham <notting@redhat.com>2005-04-15 20:21:50 +0000
commitaa0105707a1f72bd00b893fc4466c1b588390371 (patch)
tree5e00581ee7cbbb1c752e2a4caa352516dd80bf33
parent1b89d29f57a7860737465e6a07490bf293d4c7cc (diff)
downloadinitscripts-aa0105707a1f72bd00b893fc4466c1b588390371.tar
initscripts-aa0105707a1f72bd00b893fc4466c1b588390371.tar.gz
initscripts-aa0105707a1f72bd00b893fc4466c1b588390371.tar.bz2
initscripts-aa0105707a1f72bd00b893fc4466c1b588390371.tar.xz
initscripts-aa0105707a1f72bd00b893fc4466c1b588390371.zip
automatically send hostname if it's available and not overridden
(#149667)
-rwxr-xr-xsysconfig/network-scripts/ifup-eth3
1 files changed, 3 insertions, 0 deletions
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