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.
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user