diff options
author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-04-09 14:22:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 14:22:32 -0500 |
commit | 4531f181d99217ba774965f5ad1d312691aa826b (patch) | |
tree | f27a4bc78167098c1f5d7b0ca64aa4754479cdcf /pkgs/applications | |
parent | 205dfeb8e06ed83c91bb04dd9080cb0fedab212f (diff) | |
parent | b91fc28db0ee9204b404e611a965ea52360e9467 (diff) |
Merge pull request #35121 from xeji/firehol-35114
firehol: 3.1.5: fix errors when running firehol command
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/networking/firehol/default.nix | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/pkgs/applications/networking/firehol/default.nix b/pkgs/applications/networking/firehol/default.nix index 8bbc0abba221..9efe20b3ee95 100644 --- a/pkgs/applications/networking/firehol/default.nix +++ b/pkgs/applications/networking/firehol/default.nix @@ -2,8 +2,8 @@ , autoconf, automake, curl, iprange, iproute, ipset, iptables, iputils , kmod, nettools, procps, tcpdump, traceroute, utillinux, whois -# Just install FireQOS without FireHOL -, onlyQOS ? true +# If true, just install FireQOS without FireHOL +, onlyQOS ? false }: stdenv.mkDerivation rec { @@ -52,6 +52,35 @@ stdenv.mkDerivation rec { AS_IF([test "x$ac_cv_ping_6_opt" = "xyes"],[ '') + + # put firehol config files in /etc/firehol (not $out/etc/firehol) + # to avoid error on startup, see #35114 + (pkgs.writeText "firehol-sysconfdir.patch" + '' + --- a/sbin/install.config.in.in + +++ b/sbin/install.config.in.in + @@ -4 +4 @@ + -SYSCONFDIR="@sysconfdir_POST@" + +SYSCONFDIR="/etc" + '') + + # we must quote "$UNAME_CMD", or the dash in /nix/store/...-coreutils-.../bin/uname + # will be interpreted as IFS -> error. this might be considered an upstream bug + # but only appears when there are dashes in the command path + (pkgs.writeText "firehol-uname-command.patch" + '' + --- a/sbin/firehol + +++ b/sbin/firehol + @@ -10295,7 +10295,7 @@ + kmaj=$1 + kmin=$2 + + - set -- $($UNAME_CMD -r) + + set -- $("$UNAME_CMD" -r) + eval $kmaj=\$1 $kmin=\$2 + } + kernel_maj_min KERNELMAJ KERNELMIN + '') ]; nativeBuildInputs = [ autoconf automake ]; |