From d52c345c826be82f071eb9e9a4ea2c5cc23ea15c Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Fri, 6 Oct 2023 00:31:27 -0400 Subject: [PATCH] lxc/checkconfig: avoid subshell (SC2235) Signed-off-by: Simon Deziel --- src/lxc/cmd/lxc-checkconfig.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/cmd/lxc-checkconfig.in b/src/lxc/cmd/lxc-checkconfig.in index e60f27bf9..323364240 100755 --- a/src/lxc/cmd/lxc-checkconfig.in +++ b/src/lxc/cmd/lxc-checkconfig.in @@ -156,7 +156,7 @@ if is_set CONFIG_USER_NS; then fi echo -n "Network namespace: " && is_enabled CONFIG_NET_NS echo -if [ $KVER_MAJOR -lt 4 ] || ([ $KVER_MAJOR -eq 4 ] && [ $KVER_MINOR -lt 7 ]); then +if [ $KVER_MAJOR -lt 4 ] || { [ $KVER_MAJOR -eq 4 ] && [ $KVER_MINOR -lt 7 ]; }; then echo -n "Multiple /dev/pts instances: " && is_enabled DEVPTS_MULTIPLE_INSTANCES echo fi @@ -215,7 +215,7 @@ echo -n "Cgroup cpu account: " && is_enabled CONFIG_CGROUP_CPUACCT echo echo -n "Cgroup memory controller: " -if ([ $KVER_MAJOR -ge 3 ] && [ $KVER_MINOR -ge 6 ]) || [ $KVER_MAJOR -gt 3 ]; then +if { [ $KVER_MAJOR -ge 3 ] && [ $KVER_MINOR -ge 6 ]; } || [ $KVER_MAJOR -gt 3 ]; then is_enabled CONFIG_MEMCG else is_enabled CONFIG_CGROUP_MEM_RES_CTLR @@ -235,7 +235,7 @@ echo echo -n "Bridges: " && is_enabled CONFIG_BRIDGE && is_probed bridge echo echo -n "Advanced netfilter: " && is_enabled CONFIG_NETFILTER_ADVANCED && is_probed nf_tables -if ( [ $KVER_MAJOR -gt 3 ] && [ $KVER_MINOR -gt 6 ] ) && [ $KVER_MAJOR -lt 5 ] ; then +if { [ $KVER_MAJOR -gt 3 ] && [ $KVER_MINOR -gt 6 ]; } && [ $KVER_MAJOR -lt 5 ]; then echo echo -n "CONFIG_NF_NAT_IPV4: " && is_enabled CONFIG_NF_NAT_IPV4 && is_probed nf_nat_ipv4 echo -- 2.47.2