From b717d91bc532af86d721028ee97d0e3462de6f40 Mon Sep 17 00:00:00 2001 From: Pavel Zhukov Date: Wed, 20 Sep 2017 16:12:27 +0200 Subject: [PATCH] Do now override hostname variable in script --- dhclient-script | 2 ++ dhcp.spec | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dhclient-script b/dhclient-script index 9544086..14735b5 100644 --- a/dhclient-script +++ b/dhclient-script @@ -58,6 +58,7 @@ eventually_add_hostnames_domain_to_search() { search="${1}" if need_hostname; then status=1 + OLD_HOSTNAME=$HOSTNAME if [ -n "${new_ip_address}" ]; then eval $(/usr/bin/ipcalc --silent --hostname "${new_ip_address}" ; echo "status=$?") elif [ -n "${new_ip6_address}" ]; then @@ -67,6 +68,7 @@ eventually_add_hostnames_domain_to_search() { if [ ${status} -eq 0 ]; then domain=$(echo "${HOSTNAME}" | cut -s -d "." -f 2-) fi + HOSTNAME=$OLD_HOSTNAME else domain=$(hostnamectl --transient 2>/dev/null | cut -s -d "." -f 2-) fi diff --git a/dhcp.spec b/dhcp.spec index 658cc39..12c762f 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -20,7 +20,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.6 %global VERSION %%{version}%%{prever} -Release: 5%{?dist} +Release: 6%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and # that's why it is at 12 now. It should have never been used, but it was. @@ -661,6 +661,9 @@ done %endif %changelog +* Wed Sep 20 2017 Pavel Zhukov - 12:4.3.6-6 +- Do now override hostname variable in script + * Sun Sep 10 2017 Peter Robinson 12:4.3.6-5 - Rebuild for bind 9.9.11