]> git.pld-linux.org Git - packages/lxd.git/commitdiff
init: use only awk and do not hide errors
authorElan Ruusamäe <glen@delfi.ee>
Sat, 20 Aug 2016 23:21:49 +0000 (02:21 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 20 Aug 2016 23:21:49 +0000 (02:21 +0300)
lxd.init

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