Diff

core/hostmanager.lua @ 5081:c0c060e450be

hostmanager, mod_disco: Show optional 'name' option from the config in disco#items queries (fixes use-case in #292) (thanks diSabler, mva)
author Matthew Wild <mwild1@gmail.com>
date Sun, 05 Aug 2012 17:18:35 +0100
parent 4834:878f75ccc4fb
child 5123:7c5c86fa552e
line wrap: on
line diff
--- a/core/hostmanager.lua	Fri Aug 03 14:07:41 2012 +0100
+++ b/core/hostmanager.lua	Sun Aug 05 17:18:35 2012 +0100
@@ -84,7 +84,7 @@
 	end
 	hosts[host] = host_session;
 	if not host:match("[@/]") then
-		disco_items:set(host:match("%.(.*)") or "*", host, true);
+		disco_items:set(host:match("%.(.*)") or "*", host, host_config.core.name or true);
 	end
 	for option_name in pairs(host_config.core) do
 		if option_name:match("_ports$") or option_name:match("_interface$") then