diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2017-04-24 14:01:42 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2017-05-03 11:53:09 +0200 |
commit | e37d6b2c4dc1db8e31d9c230fab929cbc83648b6 (patch) | |
tree | 99863afeec04fae87c8ef66eeaeb09b42d604895 /sysconfig | |
parent | 457676588beecd9a32c056a812e59082f3b0989b (diff) | |
download | initscripts-e37d6b2c4dc1db8e31d9c230fab929cbc83648b6.tar initscripts-e37d6b2c4dc1db8e31d9c230fab929cbc83648b6.tar.gz initscripts-e37d6b2c4dc1db8e31d9c230fab929cbc83648b6.tar.bz2 initscripts-e37d6b2c4dc1db8e31d9c230fab929cbc83648b6.tar.xz initscripts-e37d6b2c4dc1db8e31d9c230fab929cbc83648b6.zip |
re-add missing $HOSTNAME initialization
Diffstat (limited to 'sysconfig')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index d3b24eee..850cc3ff 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -7,6 +7,10 @@ PATH="/sbin:/usr/sbin:/bin:/usr/bin" export PATH +# We need to initialize the $HOSTNAME variable by ourselves now: +# (It was previously done for RHEL-6 branch, but got lost in time.) +HOSTNAME="$(hostname)" + [ -z "$__sed_discard_ignored_files" ] && . /etc/init.d/functions get_hwaddr () @@ -367,9 +371,7 @@ is_available_wait () is_hostname_set () { - CHECK_HOSTNAME="$(hostname)" - - case "$CHECK_HOSTNAME" in + case "${HOSTNAME}" in '(none)' | 'localhost' | 'localhost.localdomain') # Hostname NOT set: return 1 |