diff --git a/root/usr/lib/lua/luci/model/cbi/aria2.lua b/root/usr/lib/lua/luci/model/cbi/aria2.lua index 9e9df9a..d36610b 100644 --- a/root/usr/lib/lua/luci/model/cbi/aria2.lua +++ b/root/usr/lib/lua/luci/model/cbi/aria2.lua @@ -135,7 +135,7 @@ o = s:taboption("task", Value, "max_concurrent_downloads", translate("Max concur o.placeholder = "5" o = s:taboption("task", Value, "max_connection_per_server", translate("Max connection per server"), "1-16") -o.datetype = "range(1, 16)" +o.datatype = "range(1, 16)" o.placeholder = "1" o = s:taboption("task", Value, "min_split_size", translate("Min split size"), "1M-1024M") diff --git a/root/usr/lib/lua/luci/model/cbi/vsftpd.lua b/root/usr/lib/lua/luci/model/cbi/vsftpd.lua index 47c6289..f8bbf1c 100644 --- a/root/usr/lib/lua/luci/model/cbi/vsftpd.lua +++ b/root/usr/lib/lua/luci/model/cbi/vsftpd.lua @@ -163,6 +163,7 @@ anon_max_rate.rmempty=true anon_max_rate:depends("anonymous_enable",1) chown_username=s:taboption("anonymous",ListValue,"chown_username",translate("Chown User")) chown_username:depends("anonymous_enable",1) +local list_user for _, list_user in luci.util.vspairs(luci.util.split(luci.sys.exec("cat /etc/passwd | cut -f 1 -d:"))) do chown_username:value(list_user) end @@ -174,8 +175,14 @@ local_userlist_type=s:taboption("userlist",ListValue,"userlist_type",translate(" local_userlist_type:value("allow","allow") local_userlist_type:value("deny","deny") list=s:taboption("userlist",DynamicList,"userlist",translate("User")) +list.datatype = "string" for _, list_user in luci.util.vspairs(luci.util.split(luci.sys.exec("cat /etc/passwd | cut -f 1 -d:"))) do - list:value(list_user) + repeat + if list_user == "" then + break + end + list:value(list_user) + until true end tmpl=s:taboption("template",Value,"_tmpl","",translate("Here,you can edit the template of config file"))