mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
dhcpcd: make dhcpcd work in linux containers
This commit is contained in:
parent
ed9ce850fd
commit
c2f385cf4a
@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1i7fv1l0n7q1mnia7g0789ch63x5zhwk5gsrwvs78dv2f2kmvcd3";
|
||||
};
|
||||
|
||||
patches = [ ./lxc_ro_promote_secondaries.patch ];
|
||||
|
||||
configureFlags = "--sysconfdir=/etc";
|
||||
|
||||
makeFlags = "PREFIX=\${out}";
|
||||
|
@ -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;
|
Loading…
Reference in New Issue
Block a user