From d1d2e7e75e7ec1725875f25cd540d47b10d50f57 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 4 Apr 2022 21:30:35 +0200 Subject: [PATCH] interfaces: tweak wording and mark nonexistent as "no carrier" --- src/www/interfaces_assign.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/www/interfaces_assign.php b/src/www/interfaces_assign.php index 2b8213920..a2ea82b17 100644 --- a/src/www/interfaces_assign.php +++ b/src/www/interfaces_assign.php @@ -152,7 +152,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } if (!does_interface_exist($_POST['if_add'])) { - $input_errors[] = sprintf(gettext('The interface "%s" does not exist yet. Make sure to apply its configuration first.'), $_POST['if_add']); + $input_errors[] = sprintf(gettext('The interface "%s" does not exist. Make sure to apply its configuration first.'), $_POST['if_add']); } if (count($input_errors) == 0) { @@ -354,6 +354,8 @@ foreach ($intfkeys as $portname) { $portused = false; if (!empty($ifdetails[$portname]) && !empty($ifdetails[$portname]['status'])) { $interfaces[$portname]['status'] = $ifdetails[$portname]['status']; + } elseif (empty($ifdetails[$portname])) { + $interfaces[$portname]['status'] = 'no carrier'; } foreach ($all_interfaces as $ifname => $ifdata) { if ($ifdata['if'] == $portname) {