diff options
author | Matthieu Coudron <mattator@gmail.com> | 2018-05-11 17:42:37 +0900 |
---|---|---|
committer | Matthieu Coudron <mattator@gmail.com> | 2018-05-15 21:55:04 +0900 |
commit | 1e0975f4c05959cf11b5a905f335c269dcaae630 (patch) | |
tree | 22dba45f4228d53c664d7b76cbad0c6f363cf9ee /pkgs/os-specific/linux/iproute | |
parent | 6db7f92cc2af827e8b8b181bf5ed828a1d0f141d (diff) |
iproute2: module to create rt_table file & co
When doing source routing/multihoming, it's practical to give names to routing tables. The absence of the rt_table file in /etc make this impossible. This patch recreates these files on rebuild so that they can be modified by the user see NixOS#38638. iproute2 is modified to look into config.networking.iproute2.confDir instead of /etc/iproute2.
Diffstat (limited to 'pkgs/os-specific/linux/iproute')
-rw-r--r-- | pkgs/os-specific/linux/iproute/default.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/iproute/default.nix b/pkgs/os-specific/linux/iproute/default.nix index 7d412d7e15d0d..8ccb0c203803e 100644 --- a/pkgs/os-specific/linux/iproute/default.nix +++ b/pkgs/os-specific/linux/iproute/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, lib, flex, bash, bison, db, iptables, pkgconfig }: +{ fetchurl, stdenv, config, lib, flex, bash, bison, db, iptables, pkgconfig }: stdenv.mkDerivation rec { name = "iproute2-${version}"; @@ -26,8 +26,9 @@ stdenv.mkDerivation rec { "HDRDIR=$(TMPDIR)/include/iproute2" # Don't install headers ]; + # enable iproute2 module if you want this folder to be created buildFlags = [ - "CONFDIR=/etc/iproute2" + "CONFDIR=${config.iproute2.confDir or "/run/iproute2"}" ]; installFlags = [ |