mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-22 17:31:04 +03:00
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:
parent
b8352653ac
commit
c730f29e7f
1 changed files with 11 additions and 9 deletions
|
@ -103,6 +103,7 @@ let
|
||||||
|
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
|
${optionalString (!config.environment.etc?"resolv.conf") ''
|
||||||
# Set the static DNS configuration, if given.
|
# Set the static DNS configuration, if given.
|
||||||
${pkgs.openresolv}/sbin/resolvconf -m 1 -a static <<EOF
|
${pkgs.openresolv}/sbin/resolvconf -m 1 -a static <<EOF
|
||||||
${optionalString (cfg.nameservers != [] && cfg.domain != null) ''
|
${optionalString (cfg.nameservers != [] && cfg.domain != null) ''
|
||||||
|
@ -113,6 +114,7 @@ let
|
||||||
nameserver ${ns}
|
nameserver ${ns}
|
||||||
'')}
|
'')}
|
||||||
EOF
|
EOF
|
||||||
|
''}
|
||||||
|
|
||||||
# Set the default gateway.
|
# Set the default gateway.
|
||||||
${optionalString (cfg.defaultGateway != null && cfg.defaultGateway.address != "") ''
|
${optionalString (cfg.defaultGateway != null && cfg.defaultGateway.address != "") ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue