diff options
author | Bill Nottingham <notting@redhat.com> | 2005-04-15 20:21:50 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-04-15 20:21:50 +0000 |
commit | aa0105707a1f72bd00b893fc4466c1b588390371 (patch) | |
tree | 5e00581ee7cbbb1c752e2a4caa352516dd80bf33 /sysconfig | |
parent | 1b89d29f57a7860737465e6a07490bf293d4c7cc (diff) | |
download | initscripts-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)
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 3 |
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 |