gluon-luci-admin: allow removing all SSH keys

This commit is contained in:
Matthias Schiffer 2014-07-14 18:56:49 +02:00
parent 74d29bcdc9
commit e5999b3f44

View File

@ -40,7 +40,7 @@ if fs.access("/etc/config/dropbear") then
keys = s:option(TextValue, "_data", "")
keys.wrap = "off"
keys.rows = 5
keys.rmempty = false
keys.rmempty = true
function keys.cfgvalue()
return fs.readfile("/etc/dropbear/authorized_keys") or ""
@ -51,6 +51,10 @@ if fs.access("/etc/config/dropbear") then
fs.writefile("/etc/dropbear/authorized_keys", value:gsub("\r\n", "\n"))
end
end
function keys.remove(self, section)
fs.remove("/etc/dropbear/authorized_keys")
end
end
s = m:section(TypedSection, "_pass", nil,