diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2015-01-12 12:49:46 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2016-05-26 15:44:09 +0200 |
commit | da83c4e174991b2dedf6ce7f8c490f2d1fbc1d57 (patch) | |
tree | c5fc4c2d3afb1570af7f777c993eb21a15406c2e /sysconfig/network-scripts | |
parent | b399247905d9d4a9d12bb3f17b6d085dfbd674c8 (diff) | |
download | initscripts-da83c4e174991b2dedf6ce7f8c490f2d1fbc1d57.tar initscripts-da83c4e174991b2dedf6ce7f8c490f2d1fbc1d57.tar.gz initscripts-da83c4e174991b2dedf6ce7f8c490f2d1fbc1d57.tar.bz2 initscripts-da83c4e174991b2dedf6ce7f8c490f2d1fbc1d57.tar.xz initscripts-da83c4e174991b2dedf6ce7f8c490f2d1fbc1d57.zip |
network-functions: is_available_wait should wait even in the case that is_available returns 2
Cherry-picked from: 1f230a3d2e2733e30577c91645005801ab2c0f40
Resolves: #1339648
Diffstat (limited to 'sysconfig/network-scripts')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 8fbfbab2..61a851f0 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -336,18 +336,16 @@ is_available_wait () local retry=${2##*[!0-9]*} - is_available $1 + is_available $1 && return 0 ret=$? - [ 0"$ret" -ne 1 ] && return $ret - while [ 0"$retry" -gt 0 ]; do sleep 1 [ -d "/sys/class/net/$1" ] && return 0 retry=$(($retry -1)) done - return 1 + return $ret } need_hostname () |