applications/luci-ffwizard-leipzig: set crond less verbose
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 9 May 2009 15:46:06 +0000 (15:46 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 9 May 2009 15:46:06 +0000 (15:46 +0000)
applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua

index df5afdfa149d04d29db59513cc48933a9b646e33..fa88f015070d90f385611e8f7a157ff1055634fe 100644 (file)
@@ -235,19 +235,22 @@ function main.write(self, section, value)
        tools.firewall_zone_add_interface("freifunk", device)
 
 
-       -- Set hostname
        local new_hostname = ip:gsub("%.", "-")
        local old_hostname = sys.hostname()
 
-       if old_hostname == "OpenWrt" or old_hostname:match("^%d+-%d+-%d+-%d+$") then
-               uci:foreach("system", "system",
-                       function(s)
+       uci:foreach("system", "system",
+               function(s)
+                       -- Make crond silent
+                       uci:set("system", s['.name'], "cronloglevel", "10")
+
+                       -- Set hostname
+                       if old_hostname == "OpenWrt" or old_hostname:match("^%d+-%d+-%d+-%d+$") then
                                uci:set("system", s['.name'], "hostname", new_hostname)
-                       end)
+                               sys.hostname(new_hostname)
+                       end
+               end)
 
-               sys.hostname(new_hostname)
-               uci:save("system")
-       end
+       uci:save("system")
 end