2018-04-12 13:18:56 +00:00
< %+header%>
< % if stderr and #stderr > 0 then %>< pre class = "error" > < %=pcdata(stderr)%>< / pre > < % end %>
< form class = "inline" method = "post" action = "<%=url('admin/system/openmptcprouter/settings_add')%>" >
< div class = "cbi-map" >
< h2 name = "content" > < %:Advanced Settings%>< / h2 >
< fieldset class = "cbi-section" id = "networks" >
< legend > < %:Networks settings%>< / legend >
< div class = "cbi-section-descr" > < / div >
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:IPv4 TCP Keepalive time%>< / label >
< div class = "cbi-value-field" >
< input type = "text" name = "tcp_keepalive_time" class = "cbi-input-text" value = "<%=tonumber((luci.sys.exec(" sysctl net . ipv4 . tcp_keepalive_time " ) ) :match ( " % d + " ) ) % > ">
< / div >
< / div >
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:Disable IPv6%>< / label >
< div class = "cbi-value-field" >
2018-04-13 12:26:50 +00:00
< input type = "checkbox" name = "disable_ipv6" class = "cbi-input-checkbox" value = "1" < % if tonumber ( ( luci . sys . exec ( " sysctl net . ipv6 . conf . all . disable_ipv6 " ) ) :match ( " % d + " ) ) = = 1 then % > checked< % end %>>
2018-04-12 13:18:56 +00:00
< / div >
< / div >
< / fieldset >
2018-04-17 07:27:15 +00:00
< % if nixio.fs.access("/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq") then %>
< fieldset class = "cbi-section" id = "system" >
< legend > < %:Systems settings%>< / legend >
< div class = "cbi-section-descr" > < / div >
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:Minimum scaling CPU frequency%>< / label >
< div class = "cbi-value-field" >
2018-04-17 12:48:55 +00:00
< 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 + " ) ) % > ">
2018-04-17 07:27:15 +00:00
< / div >
< / div >
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:Maximum scaling CPU frequency%>< / label >
< div class = "cbi-value-field" >
2018-04-17 12:48:55 +00:00
< 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 + " ) ) % > ">
2018-04-17 07:27:15 +00:00
< / div >
< / div >
< div class = "cbi-value" >
< label class = "cbi-value-title" > < %:Scaling governor%>< / label >
< div class = "cbi-value-field" >
< select class = "cbi-input-select" name = "scaling_governor" >
< %
2018-04-17 12:48:55 +00:00
governor=luci.util.trim(luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor"))
2018-04-17 07:27:15 +00:00
available_governors=luci.sys.exec("cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors")
for gov in string.gmatch(available_governors, "[^%s]+") do
%>
2018-04-17 12:48:55 +00:00
< option value = "<%=gov%>" < % if governor = = gov then % > selected="selected"< % end %>>< %=gov%>< / option >
2018-04-17 07:27:15 +00:00
< %
end
%>
< / select >
< / div >
< / div >
< / fieldset >
< % end %>
2018-04-12 13:18:56 +00:00
< / div >
< div class = "cbi-page-actions" >
< input type = "hidden" name = "token" value = "<%=token%>" / >
< button class = "btn" type = "submit" > Submit< / button >
< / div >
< / form >
< %+footer%>