Merge pull request #132347 from anpandey/captive-browser-fix
captive-browser: fix empty string in interface args
This commit is contained in:
commit
002cf7d42d
1 changed files with 6 additions and 6 deletions
|
@ -85,18 +85,18 @@ in
|
|||
|
||||
programs.captive-browser.dhcp-dns =
|
||||
let
|
||||
iface = prefix:
|
||||
optionalString cfg.bindInterface (concatStringsSep " " (map escapeShellArg [ prefix cfg.interface ]));
|
||||
iface = prefixes:
|
||||
optionalString cfg.bindInterface (escapeShellArgs (prefixes ++ [ cfg.interface ]));
|
||||
in
|
||||
mkOptionDefault (
|
||||
if config.networking.networkmanager.enable then
|
||||
"${pkgs.networkmanager}/bin/nmcli dev show ${iface ""} | ${pkgs.gnugrep}/bin/fgrep IP4.DNS"
|
||||
"${pkgs.networkmanager}/bin/nmcli dev show ${iface []} | ${pkgs.gnugrep}/bin/fgrep IP4.DNS"
|
||||
else if config.networking.dhcpcd.enable then
|
||||
"${pkgs.dhcpcd}/bin/dhcpcd ${iface "-U"} | ${pkgs.gnugrep}/bin/fgrep domain_name_servers"
|
||||
"${pkgs.dhcpcd}/bin/dhcpcd ${iface ["-U"]} | ${pkgs.gnugrep}/bin/fgrep domain_name_servers"
|
||||
else if config.networking.useNetworkd then
|
||||
"${cfg.package}/bin/systemd-networkd-dns ${iface ""}"
|
||||
"${cfg.package}/bin/systemd-networkd-dns ${iface []}"
|
||||
else
|
||||
"${config.security.wrapperDir}/udhcpc --quit --now -f ${iface "-i"} -O dns --script ${
|
||||
"${config.security.wrapperDir}/udhcpc --quit --now -f ${iface ["-i"]} -O dns --script ${
|
||||
pkgs.writeShellScript "udhcp-script" ''
|
||||
if [ "$1" = bound ]; then
|
||||
echo "$dns"
|
||||
|
|
Loading…
Reference in a new issue