]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
checkconfig: Hide version if no lxc-start
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 3 Jan 2023 22:42:47 +0000 (17:42 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 6 Jan 2023 22:15:05 +0000 (17:15 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/cmd/lxc-checkconfig.in

index 430469bf32a780631c3a9efa717735c68794d09a..1be980a8b03c6c1843bf755d6cd8cf9f8d040bcb 100755 (executable)
@@ -69,7 +69,9 @@ is_probed() {
     fi
 }
 
-echo "LXC version $(lxc-start --version)"
+if type lxc-start >/dev/null 2>&1; then
+    echo "LXC version $(lxc-start --version)"
+fi
 
 if [ ! -f $CONFIG ]; then
     echo "Kernel configuration not found at $CONFIG; searching..."