avahi: Never set host-name' to the empty string in
avahi-daemon.conf'.
This commit is contained in:
parent
27880ed729
commit
f7530dc5ee
@ -11,7 +11,13 @@ let
|
|||||||
|
|
||||||
avahiDaemonConf = with cfg; pkgs.writeText "avahi-daemon.conf" ''
|
avahiDaemonConf = with cfg; pkgs.writeText "avahi-daemon.conf" ''
|
||||||
[server]
|
[server]
|
||||||
host-name=${hostName}
|
${# Users can set `networking.hostName' to the empty string, when getting
|
||||||
|
# a host name from DHCP. In that case, let Avahi take whatever the
|
||||||
|
# current host name is; setting `host-name' to the empty string in
|
||||||
|
# `avahi-daemon.conf' would be invalid.
|
||||||
|
if hostName != ""
|
||||||
|
then "host-name=${hostName}"
|
||||||
|
else ""}
|
||||||
browse-domains=${concatStringsSep ", " browseDomains}
|
browse-domains=${concatStringsSep ", " browseDomains}
|
||||||
use-ipv4=${if ipv4 then "yes" else "no"}
|
use-ipv4=${if ipv4 then "yes" else "no"}
|
||||||
use-ipv6=${if ipv6 then "yes" else "no"}
|
use-ipv6=${if ipv6 then "yes" else "no"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user