luci-app-statistics: only include lua modules into local scope
[project/luci.git] / applications / luci-app-statistics / luasrc / model / cbi / luci_statistics / collectd.lua
index 663a3f12d4a5e579babc59ca9e9d07648b546a15..b380febac0ba7c20fd222594f82df323fca432ee 100644 (file)
@@ -1,7 +1,7 @@
 -- Copyright 2008 Freifunk Leipzig / Jo-Philipp Wich <jow@openwrt.org>
 -- Licensed to the public under the Apache License 2.0.
 
-require("luci.sys")
+local sys = require("luci.sys")
 
 
 m = Map("luci_statistics",
@@ -17,7 +17,7 @@ s = m:section( NamedSection, "collectd", "luci_statistics" )
 
 -- general.hostname (Hostname)
 hostname = s:option( Value, "Hostname", translate("Hostname") )
-hostname.default  = luci.sys.hostname()
+hostname.default  = sys.hostname()
 hostname.optional = true
 
 -- general.basedir (BaseDir)