]> git.proxmox.com Git - mirror_lxc.git/commitdiff
checkconfig: Fix filesystem capability check
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 3 Jan 2023 23:02:44 +0000 (18:02 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 3 Jan 2023 23:02:55 +0000 (18:02 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/cmd/lxc-checkconfig.in

index ccddfe4b3a1b51d572652b233c8d3b23d8dbe9e6..85333e5e1072cad3936d18af3f8237a1acb028ed 100755 (executable)
@@ -271,15 +271,15 @@ echo -n "CONFIG_PACKET_DIAG: " && is_enabled CONFIG_PACKET_DIAG
 echo
 echo -n "CONFIG_NETLINK_DIAG: " && is_enabled CONFIG_NETLINK_DIAG
 echo
-echo -n "File capabilities: " && \
-    ( [ "${KVER_MAJOR}" = 2 ] && [ ${KVER_MINOR} -lt 33 ] && \
-       is_enabled CONFIG_SECURITY_FILE_CAPABILITIES; echo ) || \
-    ( ( [ "${KVER_MAJOR}" = "2" ] && [ ${KVER_MINOR} -gt 32 ] ) || \
-         [ ${KVER_MAJOR} -gt 2 ] && $SETCOLOR_SUCCESS && \
-         echo "enabled" && $SETCOLOR_NORMAL )
+echo -n "File capabilities: "
+if [ "${KVER_MAJOR}" = 2 ] && [ ${KVER_MINOR} -lt 33 ]; then
+    is_enabled CONFIG_SECURITY_FILE_CAPABILITIES
+    echo
+else
+    $SETCOLOR_SUCCESS && echo "enabled" && $SETCOLOR_NORMAL
+fi
 
 echo
 echo "Note : Before booting a new kernel, you can check its configuration"
 echo "usage : CONFIG=/path/to/config $0"
 echo
-