Skip to content

Commit ba5bb85

Browse files
committed
Add log entry if SYS_MODULE cap can be removed
1 parent 86d384e commit ba5bb85

File tree

1 file changed

+3
-0
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-wireguard-module

1 file changed

+3
-0
lines changed

root/etc/s6-overlay/s6-rc.d/init-wireguard-module/run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ ip link del dev test 2>/dev/null
88
if ip link add dev test type wireguard; then
99
echo "**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****"
1010
ip link del dev test
11+
if capsh --print | grep -qv '\!cap_sys_module'; then
12+
echo "**** As the wireguard module is already active you can remove the SYS_MODULE capability from your container run/compose. ****"
13+
fi
1114
else
1215
echo "**** The wireguard module is not active. If you believe that your kernel should have wireguard support already, make sure that it is activated via modprobe! ****"
1316
sleep infinity

0 commit comments

Comments
 (0)