From 7b9beb81940bc5a612a226b89c9c7cbd77dd6d41 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 9 Oct 2026 09:35:31 +0200 Subject: [PATCH] Revert "interfaces: the PPP uptime option no longer exists" This reverts commit b4cca4ef5a7e9ceb8c9fa373b3fe141aefd7cefd. Meh: apparently all of this works but is never read. --- src/etc/inc/interfaces.inc | 7 +++++++ src/www/interfaces_ppps_edit.php | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 6b20586916..0c628a982e 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -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)); diff --git a/src/www/interfaces_ppps_edit.php b/src/www/interfaces_ppps_edit.php index 0b279f552d..98e47e7bc1 100644 --- a/src/www/interfaces_ppps_edit.php +++ b/src/www/interfaces_ppps_edit.php @@ -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"); + + + + /> + + + +