2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 local fs = require "nixio.fs"
16 local i18n = require "luci.i18n"
17 local util = require "luci.util"
18 local config = require "luci.config"
20 m = Map("luci", "Device Settings")
22 c = m:section(NamedSection, "main", "core", translate("Local Settings"))
24 hn = c:option(Value, "_uniquename", translate("Unique Devicename"))
25 function hn:cfgvalue(self)
26 return require "nixio.fs".readfile("/proc/sys/kernel/hostname")
29 l = c:option(ListValue, "lang", translate("System Language"))
32 local i18ndir = i18n.i18ndir .. "default."
33 for k, v in util.kspairs(config.languages) do
34 local file = i18ndir .. k:gsub("_", "-")
35 if k:sub(1, 1) ~= "." and fs.access(file .. ".lmo") then
40 pw1 = c:option(Value, "_pw1", translate("Administrator Password"))
42 pw1.default = "**********"