From: Stéphane Graber Date: Tue, 3 Jan 2023 23:02:44 +0000 (-0500) Subject: checkconfig: Fix filesystem capability check X-Git-Tag: v6.0.0~76^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4248%2Fhead;p=thirdparty%2Flxc.git checkconfig: Fix filesystem capability check Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/cmd/lxc-checkconfig.in b/src/lxc/cmd/lxc-checkconfig.in index ccddfe4b3..85333e5e1 100755 --- a/src/lxc/cmd/lxc-checkconfig.in +++ b/src/lxc/cmd/lxc-checkconfig.in @@ -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 -