--- /dev/null
+include ../../build/config.mk
+include ../../build/module.mk
\ No newline at end of file
--- /dev/null
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+module("luci.controller.ntpc", package.seeall)
+
+function index()
+ require("luci.i18n")
+ luci.i18n.loadc("ntpc")
+ if not luci.fs.isfile("/etc/config/ntpclient") then
+ return
+ end
+
+ local page = entry({"admin", "system", "ntpc"}, cbi("ntpc/ntpc"), luci.i18n.translate("ntpc"), 50)
+ page.i18n = "ntpc"
+ page.dependent = true
+
+
+ local page = entry({"mini", "system", "ntpc"}, cbi("ntpc/ntpc"), luci.i18n.translate("ntpc"), 50)
+ page.i18n = "ntpc"
+ page.dependent = true
+end
\ No newline at end of file
--- /dev/null
+ntpc = "Zeitsynchronisation"
+ntpc_desc = "Synchronisiert die Systemzeit über Internetzeitserver"
+ntpc_timeserver = "Zeitserver"
+ntpc_count = "Anzahl der Zeitmessungen"
+ntpc_count_desc = "0 = unendlich"
\ No newline at end of file
--- /dev/null
+ntpc = "Time Synchronisation"
+ntpc_desc = "Synchronizes the system time using internet time servers"
+ntpc_timeserver = "Time Server"
+ntpc_count = "Count of Time Measurements"
+ntpc_count_desc = "0 = infinite"
\ No newline at end of file
--- /dev/null
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+m = Map("ntpclient", translate("ntpc"), translate("ntpc_desc"))
+
+s = m:section(TypedSection, "ntpclient", translate("ntpc_timeserver"))
+s.anonymous = true
+s.addremove = true
+s.template = "cbi/tblsection"
+
+s:option(Value, "hostname", translate("hostname"))
+s:option(Value, "port", translate("port")).rmempty = true
+s:option(Value, "count", translate("ntpc_count"), translate("ntpc_count_desc"))
+
+return m
\ No newline at end of file
$(call Package/luci/install/template,$(1),applications/luci-statistics)
endef
+
define Package/luci-app-upnp
$(call Package/luci/webtemplate)
DEPENDS+=+luci-mod-admin-core +miniupnpd
endef
+define Package/luci-app-ntpc
+ $(call Package/luci/webtemplate)
+ DEPENDS+=+luci-mod-admin-core +ntpclient
+ TITLE:=NTP time synchronisation client configuration
+endef
+
+define Package/luci-app-ntpc/install
+ $(call Package/luci/install/template,$(1),applications/luci-ntpc)
+endef
+
+
### Server Gateway Interfaces ###
define Package/luci-sgi-cgi
ifneq ($(CONFIG_PACKAGE_luci-app-upnp),)
PKG_SELECTED_MODULES+=applications/luci-upnp
endif
+ifneq ($(CONFIG_PACKAGE_luci-app-ntpc),)
+ PKG_SELECTED_MODULES+=applications/luci-ntpc
+endif
ifneq ($(CONFIG_PACKAGE_luci-sgi-cgi),)
PKG_SELECTED_MODULES+=libs/sgi-cgi
$(eval $(call BuildPackage,luci-app-splash))
$(eval $(call BuildPackage,luci-app-statistics))
$(eval $(call BuildPackage,luci-app-upnp))
+$(eval $(call BuildPackage,luci-app-ntpc))
$(eval $(call BuildPackage,luci-sgi-cgi))
$(eval $(call BuildPackage,luci-sgi-luci))
option luci_splash "/etc/init.d/luci_splash restart"
option freifunk "/etc/init.d/luci_freifunk restart"
option upnpd "/etc/init.d/miniupnpd enabled && /etc/init.d/miniupnpd restart || /etc/init.d/miniupnpd stop"
+ option ntpclient "/etc/init.d/ntpclient restart"
config internal languages
option de "Deutsch"
entry({"mini", "system"}, call("action_reboot"), i18n("system"))
entry({"mini", "system", "passwd"}, call("action_passwd"), i18n("a_s_changepw"), 10)
- entry({"mini", "system", "upgrade"}, call("action_upgrade"), i18n("a_s_flash"), 20)
- entry({"mini", "system", "reboot"}, call("action_reboot"), i18n("reboot"), 30)
+ entry({"mini", "system", "upgrade"}, call("action_upgrade"), i18n("a_s_flash"), 90)
+ entry({"mini", "system", "reboot"}, call("action_reboot"), i18n("reboot"), 100)
end
function action_reboot()