mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix OpenMPTCProuter advanced settings
This commit is contained in:
parent
42ace5fe26
commit
b9fa5733c5
5 changed files with 24 additions and 9 deletions
|
@ -101,7 +101,9 @@ function settings_add()
|
|||
ucic:save("openmptcprouter")
|
||||
ucic:commit("openmptcprouter")
|
||||
end
|
||||
|
||||
|
||||
luci.sys.call("/etc/init.d/openmptcprouter restart >/dev/null 2>/dev/null")
|
||||
|
||||
-- Done, redirect
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/system/openmptcprouter/settings"))
|
||||
return
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Minimum scaling CPU frequency%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="scaling_min_freq" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("echo /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq")):match("%d+"))%>">
|
||||
<input type="text" name="scaling_min_freq" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq")):match("%d+"))%>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Maximum scaling CPU frequency%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="scaling_max_freq" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("echo /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq")):match("%d+"))%>">
|
||||
<input type="text" name="scaling_max_freq" class="cbi-input-text" value="<%=tonumber((luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq")):match("%d+"))%>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
|
@ -41,11 +41,11 @@
|
|||
<div class="cbi-value-field">
|
||||
<select class="cbi-input-select" name="scaling_governor">
|
||||
<%
|
||||
governor=luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor")
|
||||
governor=luci.util.trim(luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor"))
|
||||
available_governors=luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors")
|
||||
for gov in string.gmatch(available_governors, "[^%s]+") do
|
||||
%>
|
||||
<option value="<%=gov%>" <% if governor == gov then %>selected="selected"<% end %>>
|
||||
<option value="<%=gov%>" <% if governor == gov then %>selected="selected"<% end %>><%=gov%></option>
|
||||
<%
|
||||
end
|
||||
%>
|
||||
|
|
|
@ -107,7 +107,11 @@
|
|||
}
|
||||
if (mArray.openmptcprouter.tun_service == false)
|
||||
{
|
||||
statusMessage += 'TUN service is not running';
|
||||
statusMessage += 'TUN service is not running<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.wan_addr == "")
|
||||
{
|
||||
statusMessage += 'No VPS IP address';
|
||||
}
|
||||
|
||||
if(statusMessage !== "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue