summaryrefslogtreecommitdiffstats
path: root/tinydns-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tinydns-model.lua')
-rw-r--r--tinydns-model.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/tinydns-model.lua b/tinydns-model.lua
index fa0632f..e75f937 100644
--- a/tinydns-model.lua
+++ b/tinydns-model.lua
@@ -18,13 +18,13 @@ local configdir = "/etc/"..processname
local descr = {
prefix={
['.']="Name server for your domain (NS + A + SOA)",
- ['&']="Deletegate subdomain (NS + A)",
+ ['&']="Delegate subdomain (NS + A)",
['=']="Host (A + PTR)",
['+']="Alias (A, no PTR)",
['@']="Mail exchanger (MX)",
["'"]="Text record (TXT)",
['^']="Reverse record (PTR)",
- ['C']="Canonical Name (CNAME)",
+ ['C']="Canonical name (CNAME)",
['Z']="SOA record (SOA)",
[':']="Generic record",
['%']="Client location",
@@ -309,7 +309,8 @@ function updatefilecontent (path, modifications)
if not (fs.is_file(path)) then
errtxt = "Not a filename"
elseif (validfilename(path)) then
- fs.write_file(path, format.dostounix(modifications))
+ modifications = string.gsub(format.dostounix(modifications), "\n*$", "")
+ fs.write_file(path, modifications)
success = true
else
errtxt = "Not a valid filename!"