mirror of
https://github.com/opnsense/core.git
synced 2026-10-12 02:20:36 +00:00
Revert "interfaces: the PPP uptime option no longer exists"
This reverts commit b4cca4ef5a.
Meh: apparently all of this works but is never read.
This commit is contained in:
@@ -1329,6 +1329,13 @@ EOD;
|
||||
/* write the configuration */
|
||||
@file_put_contents("/var/etc/mpd_{$interface}.conf", $mpdconf);
|
||||
|
||||
/* create the uptime log if requested */
|
||||
if (isset($ppp['uptime'])) {
|
||||
@touch("/conf/{$ifcfg['if']}.log");
|
||||
} else {
|
||||
@unlink("/conf/{$ifcfg['if']}.log");
|
||||
}
|
||||
|
||||
/* clean up old lock files */
|
||||
foreach ($ports as $port) {
|
||||
@unlink('/var/spool/lock/LCK..' . basename($port));
|
||||
|
||||
@@ -101,7 +101,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$id = $_GET['id'];
|
||||
}
|
||||
// plain 1-on-1 copy
|
||||
$copy_fields = array('ptpid', 'type', 'username', 'idletimeout', 'descr', 'simpin', 'pin-wait',
|
||||
$copy_fields = array('ptpid', 'type', 'username', 'idletimeout', 'uptime', 'descr', 'simpin', 'pin-wait',
|
||||
'apn', 'apnum', 'phone', 'connect-timeout', 'provider', 'hostuniq');
|
||||
foreach ($copy_fields as $fieldname) {
|
||||
if (isset($a_ppps[$id][$fieldname])) {
|
||||
@@ -220,6 +220,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
if (!empty($pconfig['idletimeout'])) {
|
||||
$ppp['idletimeout'] = $pconfig['idletimeout'];
|
||||
}
|
||||
$ppp['uptime'] = !empty($pconfig['uptime']);
|
||||
if (!empty($pconfig['descr'])) {
|
||||
$ppp['descr'] = $pconfig['descr'];
|
||||
}
|
||||
@@ -712,6 +713,16 @@ include("head.inc");
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none" class="act_show_advanced">
|
||||
<td><a id="help_for_uptime" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?= gettext("Uptime Logging"); ?></td>
|
||||
<td>
|
||||
<input type="checkbox" value="on" id="uptime" name="uptime" <?=!empty($pconfig['uptime']) ? "checked=\"checked\"" : ""; ?> />
|
||||
<?= gettext("Enable persistent logging of connection uptime."); ?>
|
||||
<div class="hidden" data-for="help_for_uptime">
|
||||
<?= gettext("This option causes cumulative uptime to be recorded and displayed on the Status Interfaces page."); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- Advanced (all) -->
|
||||
|
||||
Reference in New Issue
Block a user