diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2016-11-10 12:14:30 +0100 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2016-11-10 16:38:18 +0100 |
commit | e20a9baff26986d2bbb8201615dd39c9748b7141 (patch) | |
tree | 3713320dac1be347d8a8065b8ffb93bd57596375 /sysconfig/network-scripts/network-functions | |
parent | eb1a9ae171f8be0137c146b9dfb3906f90d5a8be (diff) | |
download | initscripts-e20a9baff26986d2bbb8201615dd39c9748b7141.tar initscripts-e20a9baff26986d2bbb8201615dd39c9748b7141.tar.gz initscripts-e20a9baff26986d2bbb8201615dd39c9748b7141.tar.bz2 initscripts-e20a9baff26986d2bbb8201615dd39c9748b7141.tar.xz initscripts-e20a9baff26986d2bbb8201615dd39c9748b7141.zip |
network-functions: do not send hostname via dhclient everytime
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 7f753e29..4ff6b988 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -355,13 +355,16 @@ is_available_wait () need_hostname () { - CHECK_HOSTNAME=$(hostname) - if [ "$CHECK_HOSTNAME" = "(none)" -o "$CHECK_HOSTNAME" = "localhost" -o \ - "$CHECK_HOSTNAME" = "localhost.localdomain" ]; then - return 0 - else - return 1 - fi + CHECK_HOSTNAME="$(hostname)" + + case "$CHECK_HOSTNAME" in + '(none)' | 'localhost' | 'localhost.localdomain') + return 0 + ;; + *) + return 1 + ;; + esac } set_hostname () |