]> git.pld-linux.org Git - packages/lxd.git/commitdiff
- do not create empty pidfile
authormis <mistoo@gmail.com>
Sun, 21 Aug 2016 16:08:09 +0000 (18:08 +0200)
committermis <mistoo@gmail.com>
Sun, 21 Aug 2016 16:08:09 +0000 (18:08 +0200)
lxd.init

index 41f1bfa6318dcee4556fc421dd8f3a63eec93652..69ad85bab836daeaeeab71fa8888eb222335f609 100755 (executable)
--- a/lxd.init
+++ b/lxd.init
@@ -47,7 +47,7 @@ start() {
        while [ -z "$pid" -a $ntry -lt 5 ]; do
                [ -z "$pid" ] && sleep 1
                pid=$(lxc info | awk '/serverpid:/{print $2}')
-               echo $pid > $pidfile
+               [ -n "$pid" ] && echo $pid > $pidfile
                ntry=$(($ntry+1))
        done
 
This page took 0.516032 seconds and 4 git commands to generate.