dhcpcd: make dhcpcd work in linux containers

This commit is contained in:
Jaka Hudoklin 2013-12-13 09:44:51 +01:00
parent ed9ce850fd
commit c2f385cf4a
2 changed files with 14 additions and 0 deletions

View File

@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "1i7fv1l0n7q1mnia7g0789ch63x5zhwk5gsrwvs78dv2f2kmvcd3";
};
patches = [ ./lxc_ro_promote_secondaries.patch ];
configureFlags = "--sysconfdir=/etc";
makeFlags = "PREFIX=\${out}";

View File

@ -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;