[packages/lxd] init: fix loop counter
glen
glen at pld-linux.org
Sun Aug 21 01:21:09 CEST 2016
commit c309177a58d45b2a8aad51ae132473bee705e7a0
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Aug 21 02:20:19 2016 +0300
init: fix loop counter
expr does not do math like used:
$ expr 0+1
0+1
use shell arithmetics
lxd.init | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lxd.init b/lxd.init
index 329d74a..4f2b14e 100755
--- a/lxd.init
+++ b/lxd.init
@@ -48,7 +48,7 @@ start() {
[ -z "$pid" ] && sleep 1
pid=$(lxc info 2>/dev/null | grep serverpid: | awk '{print $2}')
echo $pid > $pidfile
- ntry=$(expr $ntry+1)
+ ntry=$(($ntry+1))
done
if [ -n "$pid" ]; then
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/lxd.git/commitdiff/c309177a58d45b2a8aad51ae132473bee705e7a0
More information about the pld-cvs-commit
mailing list