diff --git a/pkgs/tools/networking/dhcpcd/default.nix b/pkgs/tools/networking/dhcpcd/default.nix index 9b3b6238420..ad0b62d19f8 100644 --- a/pkgs/tools/networking/dhcpcd/default.nix +++ b/pkgs/tools/networking/dhcpcd/default.nix @@ -8,6 +8,8 @@ stdenv.mkDerivation rec { sha256 = "1i7fv1l0n7q1mnia7g0789ch63x5zhwk5gsrwvs78dv2f2kmvcd3"; }; + patches = [ ./lxc_ro_promote_secondaries.patch ]; + configureFlags = "--sysconfdir=/etc"; makeFlags = "PREFIX=\${out}"; diff --git a/pkgs/tools/networking/dhcpcd/lxc_ro_promote_secondaries.patch b/pkgs/tools/networking/dhcpcd/lxc_ro_promote_secondaries.patch new file mode 100644 index 00000000000..066ea67db9e --- /dev/null +++ b/pkgs/tools/networking/dhcpcd/lxc_ro_promote_secondaries.patch @@ -0,0 +1,12 @@ +diff -rupN dhcpcd-6.1.0-old/if-linux.c dhcpcd-6.1.0/if-linux.c +--- dhcpcd-6.1.0-old/if-linux.c 2013-09-20 12:27:24.000000000 +0200 ++++ dhcpcd-6.1.0/if-linux.c 2013-12-13 09:50:24.183694744 +0100 +@@ -86,7 +86,7 @@ if_init(struct interface *iface) + + fp = fopen(path, "w"); + if (fp == NULL) +- return errno == ENOENT ? 0 : -1; ++ return (errno == ENOENT || errno == EROFS) ? 0 : -1; + n = fprintf(fp, "1"); + fclose(fp); + return n == -1 ? -1 : 0;