commit c309177a58d45b2a8aad51ae132473bee705e7a0
Author: Elan Ruusamäe <[email protected]>
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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to