diff options
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua index 493a735bde..6c1c1235c5 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua @@ -104,16 +104,17 @@ end keys = s2:option(TextValue, "_data", "") keys.wrap = "off" keys.rows = 3 -keys.rmempty = false function keys.cfgvalue() return fs.readfile("/etc/dropbear/authorized_keys") or "" end function keys.write(self, section, value) - if value then - fs.writefile("/etc/dropbear/authorized_keys", value:gsub("\r\n", "\n")) - end + return fs.writefile("/etc/dropbear/authorized_keys", value:gsub("\r\n", "\n")) +end + +function keys.remove(self, section, value) + return fs.writefile("/etc/dropbear/authorized_keys", "") end end |