Skip to content
Snippets Groups Projects
Commit e5999b3f authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-luci-admin: allow removing all SSH keys

parent 74d29bcd
Branches
Tags
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment