]> git.pld-linux.org Git - packages/lxd.git/commitdiff
init: fix loop counter
authorElan Ruusamäe <glen@delfi.ee>
Sat, 20 Aug 2016 23:20:19 +0000 (02:20 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 20 Aug 2016 23:20:56 +0000 (02:20 +0300)
expr does not do math like used:
$ expr 0+1
0+1

use shell arithmetics

lxd.init

index 329d74ab825172dff8ff3188cee9fb5cf0150fd6..4f2b14e477ee6af834248af3f6422e48ab0c1e2b 100755 (executable)
--- 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
This page took 0.102978 seconds and 4 git commands to generate.