diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-05-09 15:46:06 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-05-09 15:46:06 +0000 |
commit | 604cd8de6658e17cdb2830bc49697940875117ee (patch) | |
tree | 12489fa761e4ab277555df120424fb0fd7a21c5b | |
parent | 95814fcd1af5061071a96305f28f43f537911290 (diff) |
applications/luci-ffwizard-leipzig: set crond less verbose
-rw-r--r-- | applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua b/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua index df5afdfa1..fa88f0150 100644 --- a/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua +++ b/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua @@ -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 |