make dhclient work

svn path=/nixpkgs/trunk/; revision=4077
This commit is contained in:
Armijn Hemel 2005-10-12 20:32:57 +00:00
parent 14b6982164
commit bcb78a4ab7
3 changed files with 14 additions and 15 deletions

View File

@ -7,6 +7,17 @@ configurePhase() {
prefix=$out
}
preBuild() {
sed -e "s^@nettools\@^$nettools^g" \
-e "s^@coreutils\@^$coreutils^g" \
-e "s^@iputils\@^$iputils^g" \
-e "s^@gnused\@^$gnused^g" \
< client/scripts/linux > client/scripts/linux.tmp
mv client/scripts/linux.tmp client/scripts/linux
}
preBuild=preBuild
configurePhase=configurePhase
genericBuild

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, groff}:
{stdenv, fetchurl, groff, nettools, coreutils, iputils, gnused}:
stdenv.mkDerivation {
name = "dhcp-3.0.3";
@ -8,5 +8,6 @@ stdenv.mkDerivation {
md5 = "f91416a0b8ed3fd0601688cf0b7df58f";
};
buildInputs = [groff];
patches = [./dhclient-execve.patch];
inherit nettools coreutils iputils gnused;
patches = [./dhcp-3.0.3-path.patch];
}

View File

@ -1,13 +0,0 @@
diff -ruN dhcp-3.0.3/client/dhclient.c dhcp-3.0.3.new/client/dhclient.c
--- dhcp-3.0.3/client/dhclient.c 2005-03-03 17:55:22.000000000 +0100
+++ dhcp-3.0.3.new/client/dhclient.c 2005-08-21 22:23:49.000000000 +0200
@@ -2607,7 +2607,8 @@
wstatus = 0;
}
} else {
- execve (scriptName, argv, envp);
+ /* execve (scriptName, argv, envp); */
+ execv (scriptName, argv);
log_error ("execve (%s, ...): %m", scriptName);
exit (0);
}