summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-hd_idle/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-10-02 14:02:43 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-10-02 14:02:43 +0000
commitf2c15c20914f92aa39e8d569d885e1c9b741808f (patch)
tree0e8f419faf72be9870129866e7c5ce000e35e209 /applications/luci-hd_idle/luasrc
parent3f372dd416348af57905e8f3ef72aefe0012a250 (diff)
* luci/app/hd_idle: small usability enhancement
Diffstat (limited to 'applications/luci-hd_idle/luasrc')
-rw-r--r--applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua b/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua
index 32db2605ed..f7040a551b 100644
--- a/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua
+++ b/applications/luci-hd_idle/luasrc/model/cbi/hd_idle.lua
@@ -13,6 +13,8 @@ $Id$
]]--
+require("luci.fs")
+
m = Map("hd-idle", translate("hd_idle"), translate("hd_idle_desc"))
s = m:section(TypedSection, "hd-idle", translate("settings"))
@@ -21,7 +23,10 @@ s.anonymous = true
s:option(Flag, "enabled", translate("enabled", "Enable"))
-s:option(Value, "disk", translate("disk")).rmempty = true
+disk = s:option(Value, "disk", translate("disk")).rmempty = true
+for _, dev in ipairs(luci.fs.glob("/dev/[sh]d[a-z]")) do
+ disk:value(luci.fs.basename(dev))
+end
s:option(Value, "idle_time_interval", translate("idle_time_interval")).default = 10
s.rmempty = true