network-scripting: do not run resolvconf if /etc/resolv.conf is managed manually (#56682)

The second invocation of resolvconf, missed in https://github.com/NixOS/nixpkgs/pull/32308
This commit is contained in:
volth 2019-03-09 11:42:14 +00:00 committed by Danylo Hlynskyi
parent b8352653ac
commit c730f29e7f

View File

@ -103,6 +103,7 @@ let
script =
''
${optionalString (!config.environment.etc?"resolv.conf") ''
# Set the static DNS configuration, if given.
${pkgs.openresolv}/sbin/resolvconf -m 1 -a static <<EOF
${optionalString (cfg.nameservers != [] && cfg.domain != null) ''
@ -113,6 +114,7 @@ let
nameserver ${ns}
'')}
EOF
''}
# Set the default gateway.
${optionalString (cfg.defaultGateway != null && cfg.defaultGateway.address != "") ''