]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
header.pl: Hide PPPoE menu item if RED is in IP mode
authorLeo-Andres Hofmann <hofmann@leo-andres.de>
Thu, 25 Mar 2021 20:49:41 +0000 (21:49 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 29 Mar 2021 10:28:15 +0000 (10:28 +0000)
Fixes: #11342
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cfgroot/header.pl

index 5684c01c553ea11a7e8fb8894ebe5c85397fdfc7..8dea804d04c7a4901e6e97c4cd5a3f2d9eca18fd 100644 (file)
@@ -170,6 +170,12 @@ sub genmenu {
         $menu->{'02.status'}{'subMenu'}->{'74.modem-status'}{'enabled'} = 1;
     }
 
+       # Disable the Dialup/PPPoE menu item when the RED interface is in IP mode
+       # (the "Network" module is loaded by general-functions.pl)
+       if(&Network::is_red_mode_ip()) {
+               $menu->{'01.system'}{'subMenu'}->{'20.dialup'}{'enabled'} = 0;
+       }
+
     # Disbale unusable things in cloud environments
     if (&General::running_in_cloud()) {
         $menu->{'03.network'}{'subMenu'}->{'30.dhcp'}{'enabled'} = 0;