Skip to content

Commit

Permalink
fix: use cat /proc/modules over lsmod to avoid issues with containe…
Browse files Browse the repository at this point in the history
…rized environments
  • Loading branch information
oddlama authored and thelegy committed Mar 2, 2024
1 parent 133a8f0 commit 412ea84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/nftables.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 412ea84

Please sign in to comment.