mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
nixosTests.virtualbox.net-hostonlyif: use dhcpcd
dhclient is no longer built by default in the dhcp package, so this
test has been broken since that change was made. To fix, switch to
dhcpcd. dhcpcd insists on writing into /var/run, so we need to ensure
that exists.
Fixes: a2c379d4b6 ("dhcp: make client and relay component optional")
This commit is contained in:
@@ -17,7 +17,8 @@ let
|
||||
#!${pkgs.runtimeShell} -xe
|
||||
export PATH="${lib.makeBinPath [ pkgs.coreutils pkgs.util-linux ]}"
|
||||
|
||||
mkdir -p /run/dbus
|
||||
mkdir -p /run/dbus /var
|
||||
ln -s /run /var
|
||||
cat > /etc/passwd <<EOF
|
||||
root:x:0:0::/root:/bin/false
|
||||
messagebus:x:1:1::/run/dbus:/bin/false
|
||||
@@ -309,10 +310,7 @@ let
|
||||
];
|
||||
|
||||
dhcpScript = pkgs: ''
|
||||
${pkgs.dhcp}/bin/dhclient \
|
||||
-lf /run/dhcp.leases \
|
||||
-pf /run/dhclient.pid \
|
||||
-v eth0 eth1
|
||||
${pkgs.dhcpcd}/bin/dhcpcd eth0 eth1
|
||||
|
||||
otherIP="$(${pkgs.netcat}/bin/nc -l 1234 || :)"
|
||||
${pkgs.iputils}/bin/ping -I eth1 -c1 "$otherIP"
|
||||
|
||||
Reference in New Issue
Block a user