From 412ea84967cd087fc668ef6994f419bd16ac1174 Mon Sep 17 00:00:00 2001 From: oddlama Date: Tue, 19 Dec 2023 21:54:10 +0100 Subject: [PATCH] fix: use `cat /proc/modules` over lsmod to avoid issues with containerized environments --- modules/nftables.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nftables.nix b/modules/nftables.nix index efbdcf3..a699c95 100644 --- a/modules/nftables.nix +++ b/modules/nftables.nix @@ -108,7 +108,7 @@ in { checkScript = rulesetFile: name: pkgs.writeScript "nftables-${name}check" '' #! ${pkgs.runtimeShell} -e - if $(${pkgs.kmod}/bin/lsmod | grep -q ip_tables); then + if $(cat /proc/modules | grep -q ip_tables); then echo "Unload ip_tables before using nftables!" 1>&2 exit 1 else