summaryrefslogtreecommitdiffstats
path: root/scripts/kresd-query.lua
diff options
context:
space:
mode:
authorMarek Vavrusa <marek@vavrusa.com>2016-01-23 01:00:58 +0100
committerMarek Vavrusa <marek@vavrusa.com>2016-01-23 01:00:58 +0100
commit6134920acfe60bd63907afe4a4f3513b9c8404df (patch)
treec92afcddafc1b3cd54bd35c4b67d26b3eb1ad462 /scripts/kresd-query.lua
parentdaemon/lua: rrset printing, new flags (diff)
downloadknot-resolver-6134920acfe60bd63907afe4a4f3513b9c8404df.tar.xz
knot-resolver-6134920acfe60bd63907afe4a4f3513b9c8404df.zip
scripts: 'host' utility alternative in scripts
the utility supports most of the 'unbound-host' functionality except PTR records
Diffstat (limited to 'scripts/kresd-query.lua')
-rwxr-xr-xscripts/kresd-query.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/kresd-query.lua b/scripts/kresd-query.lua
index d4e57d76..4f28390a 100755
--- a/scripts/kresd-query.lua
+++ b/scripts/kresd-query.lua
@@ -12,7 +12,10 @@ return resolve("%s", kres.type.%s, kres.class.%s, 0,
function (pkt, req)
pkt = kres.pkt_t(pkt)
req = kres.request_t(req)
- pcall(function () %s end)
+ local ok, err = pcall(function () %s end)
+ if not ok then
+ print(err)
+ end
quit()
end)']]
-- Parse CLI arguments