mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
nixos/test-driver: fix corrupt hosts files
primaryIPAddress is defined using lib.optionalString. If it is the empty string (because there are no assigned IP addresses), and the machine has a hostname, we don't want to generate an invalid hosts file with that empty string as the first (IP address) field.
This commit is contained in:
@@ -93,7 +93,7 @@ let
|
||||
# We also want to test router protocols that enable connections
|
||||
# between nodes even if they don't share a VLAN, so we include
|
||||
# the primary IPs of all machines in the hosts file.
|
||||
primaryIPs = [
|
||||
primaryIPs = lib.remove "" [
|
||||
remoteConfig.networking.primaryIPAddress
|
||||
remoteConfig.networking.primaryIPv6Address
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user