]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc/checkconfig: check exit code directly (SC2181)
authorSimon Deziel <simon.deziel@canonical.com>
Fri, 6 Oct 2023 04:25:16 +0000 (00:25 -0400)
committerSimon Deziel <simon.deziel@canonical.com>
Fri, 6 Oct 2023 05:43:17 +0000 (01:43 -0400)
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
src/lxc/cmd/lxc-checkconfig.in

index bb78d06f50ef16c1641f905662b05dd5f2d9a943..9a9555eecaccbaa31990f9807b6ee300b0d0e425 100755 (executable)
@@ -64,8 +64,7 @@ is_probed() {
     if [ ! -f /proc/modules ]; then
         return
     fi
-    lsmod | grep -wm1 "^${1}" > /dev/null
-    if [ $? -eq 0 ]; then
+    if lsmod | grep -wm1 "^${1}" > /dev/null; then
         echo -n ", loaded"
     else
         echo -n ", not loaded"