]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
silence netstat warnings in lxc-ls
authorSerge Hallyn <serge.hallyn@canonical.com>
Thu, 9 Feb 2012 16:51:31 +0000 (10:51 -0600)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Sun, 26 Feb 2012 09:44:40 +0000 (10:44 +0100)
netstat -x sometimes spits errors to stderr like:
warning, got bogus unix line.
Shut those up as they don't help lxc-ls.

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc-ls.in

index 792ea0efec7c85b424f9008adae7ca5270531e97..d200509d09ef08d8d80fc005e04a16718fae68f0 100644 (file)
@@ -25,7 +25,7 @@ function get_cgroup()
 
 ls "$@" $lxcpath
 
-active=$(netstat -xl | grep $lxcpath | \
+active=$(netstat -xl 2>/dev/null | grep $lxcpath | \
        sed -e 's#.*'"$lxcpath/"'\(.*\)/command#\1#');
 
 if test -n "$active"; then