diff options
author | Steven Barth <steven@midlink.org> | 2008-08-15 09:22:45 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-15 09:22:45 +0000 |
commit | 8d9d419f846cb76dc8671ed1a75baa7103a6b39d (patch) | |
tree | 9bd07e2bff464d0239fc08e702886d79bfa370c3 /modules | |
parent | 0a0c7ca2f91b84eedbdce318bc5915f86f00cf33 (diff) |
libs/cbi: Some fixes
Diffstat (limited to 'modules')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_system/sshkeys.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/sshkeys.lua b/modules/admin-full/luasrc/model/cbi/admin_system/sshkeys.lua index a204d420f..1c5569ccd 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/sshkeys.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/sshkeys.lua @@ -17,6 +17,7 @@ local keyfile = "/etc/dropbear/authorized_keys" f = SimpleForm("sshkeys", translate("a_s_sshkeys"), translate("a_s_sshkeys1")) t = f:field(TextValue, "keys") +t.rmempty = true t.rows = 10 function t.cfgvalue() return luci.fs.readfile(keyfile) or "" @@ -24,7 +25,7 @@ end function f.handle(self, state, data) if state == FORM_VALID then - if (luci.fs.readfile(keyfile) or "") ~= data.keys then + if data.keys then luci.fs.writefile(keyfile, data.keys) end end |