From: Jo-Philipp Wich Date: Mon, 8 Mar 2010 23:47:39 +0000 (+0000) Subject: luci-0.9: merge r5769 X-Git-Tag: 0.9.0~53 X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=12a1c6647873bb42d9d0b925fb5abc709d7b6d95 luci-0.9: merge r5769 --- diff --git a/applications/luci-hd-idle/Makefile b/applications/luci-hd-idle/Makefile new file mode 100644 index 000000000..d70bb8789 --- /dev/null +++ b/applications/luci-hd-idle/Makefile @@ -0,0 +1,4 @@ +PO = hd_idle + +include ../../build/config.mk +include ../../build/module.mk diff --git a/applications/luci-hd-idle/ipkg/postinst b/applications/luci-hd-idle/ipkg/postinst new file mode 100644 index 000000000..835dc23ad --- /dev/null +++ b/applications/luci-hd-idle/ipkg/postinst @@ -0,0 +1,5 @@ +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/luci-hd_idle ) && rm -f /etc/uci-defaults/luci-hd_idle + /etc/init.d/hd-idle enabled || /etc/init.d/hd-idle enable +} diff --git a/applications/luci-hd-idle/luasrc/controller/hd_idle.lua b/applications/luci-hd-idle/luasrc/controller/hd_idle.lua new file mode 100644 index 000000000..57ff10d7c --- /dev/null +++ b/applications/luci-hd-idle/luasrc/controller/hd_idle.lua @@ -0,0 +1,28 @@ +--[[ + +LuCI hd-idle +(c) 2008 Yanira + +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.hd_idle", package.seeall) + +function index() + require("luci.i18n") + luci.i18n.loadc("hd_idle") + if not nixio.fs.access("/etc/config/hd-idle") then + return + end + + local page = entry({"admin", "services", "hd_idle"}, cbi("hd_idle"), luci.i18n.translate("hd_idle", "hd-idle"), 60) + page.i18n = "hd_idle" + page.dependent = true +end diff --git a/applications/luci-hd-idle/luasrc/model/cbi/hd_idle.lua b/applications/luci-hd-idle/luasrc/model/cbi/hd_idle.lua new file mode 100644 index 000000000..929b7ed07 --- /dev/null +++ b/applications/luci-hd-idle/luasrc/model/cbi/hd_idle.lua @@ -0,0 +1,41 @@ +--[[ + +LuCI hd-idle +(c) 2008 Yanira + +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$ + +]]-- + +require("nixio.fs") + +m = Map("hd-idle", translate("hd_idle"), translate("hd_idle_desc")) + +s = m:section(TypedSection, "hd-idle", translate("settings")) +s.anonymous = true + +s:option(Flag, "enabled", translate("enable", "Enable")) + +disk = s:option(Value, "disk", translate("disk")) +disk.rmempty = true +for dev in nixio.fs.glob("/dev/[sh]d[a-z]") do + disk:value(nixio.fs.basename(dev)) +end + +s:option(Value, "idle_time_interval", translate("idle_time_interval")).default = 10 +s.rmempty = true +unit = s:option(ListValue, "idle_time_unit", translate("idle_time_unit")) +unit.default = "minutes" +unit:value("minutes", "min") +unit:value("hours", "h") +unit.rmempty = true + +s:option(Flag, "enable_debug", translate("enable_debug")) + +return m diff --git a/applications/luci-hd-idle/root/etc/uci-defaults/luci-hd_idle b/applications/luci-hd-idle/root/etc/uci-defaults/luci-hd_idle new file mode 100644 index 000000000..6a37176a3 --- /dev/null +++ b/applications/luci-hd-idle/root/etc/uci-defaults/luci-hd_idle @@ -0,0 +1,7 @@ +#!/bin/sh + +uci batch <<-EOF + add ucitrack hd-idle + set ucitrack.@hd-idle[-1].init=hd-idle + commit ucitrack +EOF diff --git a/applications/luci-hd_idle/Makefile b/applications/luci-hd_idle/Makefile deleted file mode 100644 index d70bb8789..000000000 --- a/applications/luci-hd_idle/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -PO = hd_idle - -include ../../build/config.mk -include ../../build/module.mk diff --git a/applications/luci-hd_idle/ipkg/postinst b/applications/luci-hd_idle/ipkg/postinst deleted file mode 100644 index 835dc23ad..000000000 --- a/applications/luci-hd_idle/ipkg/postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -[ -n "${IPKG_INSTROOT}" ] || { - ( . /etc/uci-defaults/luci-hd_idle ) && rm -f /etc/uci-defaults/luci-hd_idle - /etc/init.d/hd-idle enabled || /etc/init.d/hd-idle enable -} diff --git a/applications/luci-hd_idle/luasrc/controller/hd_idle.lua b/applications/luci-hd_idle/luasrc/controller/hd_idle.lua deleted file mode 100644 index 57ff10d7c..000000000 --- a/applications/luci-hd_idle/luasrc/controller/hd_idle.lua +++ /dev/null @@ -1,28 +0,0 @@ ---[[ - -LuCI hd-idle -(c) 2008 Yanira - -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.hd_idle", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("hd_idle") - if not nixio.fs.access("/etc/config/hd-idle") then - return - end - - local page = entry({"admin", "services", "hd_idle"}, cbi("hd_idle"), luci.i18n.translate("hd_idle", "hd-idle"), 60) - page.i18n = "hd_idle" - page.dependent = true -end diff --git a/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua b/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua deleted file mode 100644 index 929b7ed07..000000000 --- a/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua +++ /dev/null @@ -1,41 +0,0 @@ ---[[ - -LuCI hd-idle -(c) 2008 Yanira - -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$ - -]]-- - -require("nixio.fs") - -m = Map("hd-idle", translate("hd_idle"), translate("hd_idle_desc")) - -s = m:section(TypedSection, "hd-idle", translate("settings")) -s.anonymous = true - -s:option(Flag, "enabled", translate("enable", "Enable")) - -disk = s:option(Value, "disk", translate("disk")) -disk.rmempty = true -for dev in nixio.fs.glob("/dev/[sh]d[a-z]") do - disk:value(nixio.fs.basename(dev)) -end - -s:option(Value, "idle_time_interval", translate("idle_time_interval")).default = 10 -s.rmempty = true -unit = s:option(ListValue, "idle_time_unit", translate("idle_time_unit")) -unit.default = "minutes" -unit:value("minutes", "min") -unit:value("hours", "h") -unit.rmempty = true - -s:option(Flag, "enable_debug", translate("enable_debug")) - -return m diff --git a/applications/luci-hd_idle/root/etc/uci-defaults/luci-hd_idle b/applications/luci-hd_idle/root/etc/uci-defaults/luci-hd_idle deleted file mode 100644 index 6a37176a3..000000000 --- a/applications/luci-hd_idle/root/etc/uci-defaults/luci-hd_idle +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -uci batch <<-EOF - add ucitrack hd-idle - set ucitrack.@hd-idle[-1].init=hd-idle - commit ucitrack -EOF diff --git a/applications/luci-mmc-over-gpio/Makefile b/applications/luci-mmc-over-gpio/Makefile new file mode 100644 index 000000000..3f031cb71 --- /dev/null +++ b/applications/luci-mmc-over-gpio/Makefile @@ -0,0 +1,4 @@ +PO = mmc_over_gpio + +include ../../build/config.mk +include ../../build/module.mk diff --git a/applications/luci-mmc-over-gpio/ipkg/postinst b/applications/luci-mmc-over-gpio/ipkg/postinst new file mode 100644 index 000000000..d88cfb963 --- /dev/null +++ b/applications/luci-mmc-over-gpio/ipkg/postinst @@ -0,0 +1,5 @@ +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/luci-mmc_over_gpio ) && rm -f /etc/uci-defaults/luci-mmc_over_gpio + /etc/init.d/mmc_over_gpio enabled || /etc/init.d/mmc_over_gpio enable +} diff --git a/applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua b/applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua new file mode 100644 index 000000000..57fe5ee38 --- /dev/null +++ b/applications/luci-mmc-over-gpio/luasrc/controller/mmc_over_gpio.lua @@ -0,0 +1,28 @@ +--[[ + +LuCI mmc_over_gpio +(c) 2008 Yanira + +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.mmc_over_gpio", package.seeall) + +function index() + require("luci.i18n") + luci.i18n.loadc("mmc_over_gpio") + if not nixio.fs.access("/etc/config/mmc_over_gpio") then + return + end + + local page = entry({"admin", "system", "mmc_over_gpio"}, cbi("mmc_over_gpio"), luci.i18n.translate("mmc_over_gpio", "mmc_over_gpio"), 60) + page.i18n = "mmc_over_gpio" + page.dependent = true +end diff --git a/applications/luci-mmc-over-gpio/luasrc/model/cbi/mmc_over_gpio.lua b/applications/luci-mmc-over-gpio/luasrc/model/cbi/mmc_over_gpio.lua new file mode 100644 index 000000000..a18e2c4f6 --- /dev/null +++ b/applications/luci-mmc-over-gpio/luasrc/model/cbi/mmc_over_gpio.lua @@ -0,0 +1,41 @@ +--[[ + +LuCI mmc_over_gpio +(c) 2008 Yanira + +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("mmc_over_gpio", translate("mmc_over_gpio"), + translate("mmc_over_gpio_desc")) + +s = m:section(TypedSection, "mmc_over_gpio", translate("settings")) +s.addremove = true +s.anonymous = true + +s:option(Flag, "enabled", translate("enabled", "Enable")) + +s:option(Value, "name", translate("name")) + +pin = s:option(Value, "DI_pin", translate("DI_pin")) +for i = 0,7 do pin:value(i) end + +pin = s:option(Value, "DO_pin", translate("DO_pin")) +for i = 0,7 do pin:value(i) end + +pin = s:option(Value, "CLK_pin", translate("CLK_pin")) +for i = 0,7 do pin:value(i) end + +pin = s:option(Value, "CS_pin", translate("CS_pin")) +for i = 0,7 do pin:value(i) end + +s:option(Value, "mode", translate("mode")) + +return m diff --git a/applications/luci-mmc-over-gpio/root/etc/uci-defaults/luci-mmc_over_gpio b/applications/luci-mmc-over-gpio/root/etc/uci-defaults/luci-mmc_over_gpio new file mode 100644 index 000000000..3dd22ec62 --- /dev/null +++ b/applications/luci-mmc-over-gpio/root/etc/uci-defaults/luci-mmc_over_gpio @@ -0,0 +1,7 @@ +#!/bin/sh + +uci batch <<-EOF + add ucitrack mmc_over_gpio + set ucitrack.@mmc_over_gpio[-1].init=mmc_over_gpio + commit ucitrack +EOF diff --git a/applications/luci-mmc_over_gpio/Makefile b/applications/luci-mmc_over_gpio/Makefile deleted file mode 100644 index 3f031cb71..000000000 --- a/applications/luci-mmc_over_gpio/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -PO = mmc_over_gpio - -include ../../build/config.mk -include ../../build/module.mk diff --git a/applications/luci-mmc_over_gpio/ipkg/postinst b/applications/luci-mmc_over_gpio/ipkg/postinst deleted file mode 100644 index d88cfb963..000000000 --- a/applications/luci-mmc_over_gpio/ipkg/postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -[ -n "${IPKG_INSTROOT}" ] || { - ( . /etc/uci-defaults/luci-mmc_over_gpio ) && rm -f /etc/uci-defaults/luci-mmc_over_gpio - /etc/init.d/mmc_over_gpio enabled || /etc/init.d/mmc_over_gpio enable -} diff --git a/applications/luci-mmc_over_gpio/luasrc/controller/mmc_over_gpio.lua b/applications/luci-mmc_over_gpio/luasrc/controller/mmc_over_gpio.lua deleted file mode 100644 index 57fe5ee38..000000000 --- a/applications/luci-mmc_over_gpio/luasrc/controller/mmc_over_gpio.lua +++ /dev/null @@ -1,28 +0,0 @@ ---[[ - -LuCI mmc_over_gpio -(c) 2008 Yanira - -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.mmc_over_gpio", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("mmc_over_gpio") - if not nixio.fs.access("/etc/config/mmc_over_gpio") then - return - end - - local page = entry({"admin", "system", "mmc_over_gpio"}, cbi("mmc_over_gpio"), luci.i18n.translate("mmc_over_gpio", "mmc_over_gpio"), 60) - page.i18n = "mmc_over_gpio" - page.dependent = true -end diff --git a/applications/luci-mmc_over_gpio/luasrc/model/cbi/mmc_over_gpio.lua b/applications/luci-mmc_over_gpio/luasrc/model/cbi/mmc_over_gpio.lua deleted file mode 100644 index a18e2c4f6..000000000 --- a/applications/luci-mmc_over_gpio/luasrc/model/cbi/mmc_over_gpio.lua +++ /dev/null @@ -1,41 +0,0 @@ ---[[ - -LuCI mmc_over_gpio -(c) 2008 Yanira - -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("mmc_over_gpio", translate("mmc_over_gpio"), - translate("mmc_over_gpio_desc")) - -s = m:section(TypedSection, "mmc_over_gpio", translate("settings")) -s.addremove = true -s.anonymous = true - -s:option(Flag, "enabled", translate("enabled", "Enable")) - -s:option(Value, "name", translate("name")) - -pin = s:option(Value, "DI_pin", translate("DI_pin")) -for i = 0,7 do pin:value(i) end - -pin = s:option(Value, "DO_pin", translate("DO_pin")) -for i = 0,7 do pin:value(i) end - -pin = s:option(Value, "CLK_pin", translate("CLK_pin")) -for i = 0,7 do pin:value(i) end - -pin = s:option(Value, "CS_pin", translate("CS_pin")) -for i = 0,7 do pin:value(i) end - -s:option(Value, "mode", translate("mode")) - -return m diff --git a/applications/luci-mmc_over_gpio/root/etc/uci-defaults/luci-mmc_over_gpio b/applications/luci-mmc_over_gpio/root/etc/uci-defaults/luci-mmc_over_gpio deleted file mode 100644 index 3dd22ec62..000000000 --- a/applications/luci-mmc_over_gpio/root/etc/uci-defaults/luci-mmc_over_gpio +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -uci batch <<-EOF - add ucitrack mmc_over_gpio - set ucitrack.@mmc_over_gpio[-1].init=mmc_over_gpio - commit ucitrack -EOF diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index 9d135223e..78654df6c 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -560,14 +560,14 @@ define Package/luci-app-samba/install endef -define Package/luci-app-mmc_over_gpio +define Package/luci-app-mmc-over-gpio $(call Package/luci/webtemplate) - DEPENDS+=+luci-admin-full +PACKAGE_luci-app-mmc_over_gpio:kmod-mmc-over-gpio + DEPENDS+=+luci-admin-full +PACKAGE_luci-app-mmc-over-gpio:kmod-mmc-over-gpio TITLE:=mmc_over_gpio endef -define Package/luci-app-mmc_over_gpio/install - $(call Package/luci/install/template,$(1),applications/luci-mmc_over_gpio) +define Package/luci-app-mmc-over-gpio/install + $(call Package/luci/install/template,$(1),applications/luci-mmc-over-gpio) endef @@ -592,14 +592,14 @@ define Package/luci-app-ushare/install $(call Package/luci/install/template,$(1),applications/luci-ushare) endef -define Package/luci-app-hd_idle +define Package/luci-app-hd-idle $(call Package/luci/webtemplate) - DEPENDS+=+luci-admin-full +PACKAGE_luci-app-hd_idle:hd-idle + DEPENDS+=+luci-admin-full +PACKAGE_luci-app-hd-idle:hd-idle TITLE:=hd-idle endef -define Package/luci-app-hd_idle/install - $(call Package/luci/install/template,$(1),applications/luci-hd_idle) +define Package/luci-app-hd-idle/install + $(call Package/luci/install/template,$(1),applications/luci-hd-idle) endef define Package/luci-app-tinyproxy @@ -988,8 +988,8 @@ endif ifneq ($(CONFIG_PACKAGE_luci-app-samba),) PKG_SELECTED_MODULES+=applications/luci-samba endif -ifneq ($(CONFIG_PACKAGE_luci-app-mmc_over_gpio),) - PKG_SELECTED_MODULES+=applications/luci-mmc_over_gpio +ifneq ($(CONFIG_PACKAGE_luci-app-mmc-over-gpio),) + PKG_SELECTED_MODULES+=applications/luci-mmc-over-gpio endif ifneq ($(CONFIG_PACKAGE_luci-app-p910nd),) PKG_SELECTED_MODULES+=applications/luci-p910nd @@ -997,8 +997,8 @@ endif ifneq ($(CONFIG_PACKAGE_luci-app-ushare),) PKG_SELECTED_MODULES+=applications/luci-ushare endif -ifneq ($(CONFIG_PACKAGE_luci-app-hd_idle),) - PKG_SELECTED_MODULES+=applications/luci-hd_idle +ifneq ($(CONFIG_PACKAGE_luci-app-hd-idle),) + PKG_SELECTED_MODULES+=applications/luci-hd-idle endif ifneq ($(CONFIG_PACKAGE_luci-app-tinyproxy),) PKG_SELECTED_MODULES+=applications/luci-tinyproxy @@ -1129,10 +1129,10 @@ $(eval $(call BuildPackage,luci-app-upnp)) $(eval $(call BuildPackage,luci-app-ntpc)) $(eval $(call BuildPackage,luci-app-ddns)) $(eval $(call BuildPackage,luci-app-samba)) -$(eval $(call BuildPackage,luci-app-mmc_over_gpio)) +$(eval $(call BuildPackage,luci-app-mmc-over-gpio)) $(eval $(call BuildPackage,luci-app-p910nd)) $(eval $(call BuildPackage,luci-app-ushare)) -$(eval $(call BuildPackage,luci-app-hd_idle)) +$(eval $(call BuildPackage,luci-app-hd-idle)) $(eval $(call BuildPackage,luci-app-tinyproxy)) $(eval $(call BuildPackage,luci-app-initmgr)) $(eval $(call BuildPackage,luci-app-livestats))