From 8d9d419f846cb76dc8671ed1a75baa7103a6b39d Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 15 Aug 2008 09:22:45 +0000 Subject: libs/cbi: Some fixes --- modules/admin-full/luasrc/model/cbi/admin_system/sshkeys.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') 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 -- cgit v1.2.3