From aba0bd69040f95779ad98da2093e2d7a24fbbc56 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 7 Dec 2022 22:01:24 +0000 Subject: [PATCH] Fix capsh logic --- root/etc/s6-overlay/s6-rc.d/init-wireguard-module/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-wireguard-module/run b/root/etc/s6-overlay/s6-rc.d/init-wireguard-module/run index 3d1e8aa..a838519 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-wireguard-module/run +++ b/root/etc/s6-overlay/s6-rc.d/init-wireguard-module/run @@ -8,7 +8,7 @@ ip link del dev test 2>/dev/null if ip link add dev test type wireguard; then echo "**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****" ip link del dev test - if capsh --print | grep -qv '\!cap_sys_module'; then + if capsh --current | grep "Current:" | grep "cap_sys_module"; then echo "**** As the wireguard module is already active you can remove the SYS_MODULE capability from your container run/compose. ****" fi else