summaryrefslogtreecommitdiffstats
path: root/src/lib/globals
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-05-06 19:20:25 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2013-05-06 19:20:25 +0200
commit711c46457ae9fef52c7c529d89c67d0d526f73ef (patch)
tree6dd72940136b91807c4fb2c20e1070cc0b6584d5 /src/lib/globals
parent2587acda28156f50149a15cad67d0c0bc1eb0bb4 (diff)
downloadnetctl-711c46457ae9fef52c7c529d89c67d0d526f73ef.tar.gz
netctl-711c46457ae9fef52c7c529d89c67d0d526f73ef.tar.xz
Improve array handling
When interpreted as an array, the empty string represents a 1-element array consisting of the empty string. This is actually very reasonable. Reported by: Thomas Bächler <thomas@archlinux.org>
Diffstat (limited to 'src/lib/globals')
-rw-r--r--src/lib/globals2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/globals b/src/lib/globals
index 94c2ac7..1d7feea 100644
--- a/src/lib/globals
+++ b/src/lib/globals
@@ -78,7 +78,7 @@ timeout_wait() {
local timeout=$1
(( timeout *= 5 ))
shift
- while ! eval "$*"; do
+ until eval "$*"; do
(( timeout-- > 0 )) || return 1
sleep 0.2
done