From 15137a29c23e4beab7641b6c6191fdff9716dea4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 8 May 2015 14:59:00 +0200 Subject: nss: Add '%mdns-host-lookup-nss'. * gnu/system/nss.scm (%mdns-host-lookup-nss): New variable. * doc/guix.texi (Name Service Switch): Document it. --- gnu/system/nss.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gnu') diff --git a/gnu/system/nss.scm b/gnu/system/nss.scm index ec2d2517e7..f4d2855289 100644 --- a/gnu/system/nss.scm +++ b/gnu/system/nss.scm @@ -29,6 +29,8 @@ lookup-specification %default-nss + %mdns-host-lookup-nss + %files %compat %dns @@ -148,6 +150,27 @@ ;; Default NSS configuration. (name-service-switch)) +(define %mdns-host-lookup-nss + (name-service-switch + (hosts (list %files ;first, check /etc/hosts + + ;; If the above did not succeed, try with 'mdns_minimal'. + (name-service + (name "mdns_minimal") + + ;; 'mdns_minimal' is authoritative for '.local'. When it + ;; returns "not found", no need to try the next methods. + (reaction (lookup-specification + (not-found => return)))) + + ;; Then fall back to DNS. + (name-service + (name "dns")) + + ;; Finally, try with the "full" 'mdns'. + (name-service + (name "mdns")))))) + ;;; ;;; Serialization. -- cgit v1.2.3