modules/admin-full: fixup newlines when storing sysupgrade.conf
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 10 Jan 2011 15:48:49 +0000 (15:48 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 10 Jan 2011 15:48:49 +0000 (15:48 +0000)
modules/admin-full/luasrc/model/cbi/admin_index/luci.lua

index 6ecf298eb2cc3e3f14340b23f5c69197ba48936f..e29479b07a236162e04de9c55a5f364e9fe1628a 100644 (file)
@@ -100,6 +100,7 @@ c.cfgvalue = function(self, section)
 end
 
 c.write = function(self, section, value)
+       value = value:gsub("\r\n?", "\n")
        return nixio.fs.writefile("/etc/sysupgrade.conf", value)
 end