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 6ecf298..e29479b 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