Do now override hostname variable in script

This commit is contained in:
Pavel Zhukov 2017-09-20 16:12:27 +02:00
parent 6b95e94cf8
commit b717d91bc5
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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 <pzhukov@redhat.com> - 12:4.3.6-6
- Do now override hostname variable in script
* Sun Sep 10 2017 Peter Robinson <pbrobinson@fedoraproject.org> 12:4.3.6-5
- Rebuild for bind 9.9.11