header.pl: Fixbug13857 - Disable Blue Access submenu if no BLUE network

Message ID 20250528064223.1975817-1-stephen@firemypi.org
State Staged
Commit 1a89896a79d0060e08df287f9c4536dba12927d3
Headers
Series header.pl: Fixbug13857 - Disable Blue Access submenu if no BLUE network |

Commit Message

Stephen Cuka May 28, 2025, 6:42 a.m. UTC
  - Fix reference to BlueAccess menu item so that it is disabled
   when BLUE network is not in use.

Signed-off-by: Stephen Cuka <stephen@firemypi.org>
---
 config/cfgroot/header.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer May 28, 2025, 9:26 a.m. UTC | #1
Hello Stephen,

Good catch! This was broken since 2019.

  https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=820b2909825479b52696886d1f9054c0f709d3f0

-Michael

> On 28 May 2025, at 07:42, Stephen Cuka <stephen@firemypi.org> wrote:
> 
> - Fix reference to BlueAccess menu item so that it is disabled
>   when BLUE network is not in use.
> 
> Signed-off-by: Stephen Cuka <stephen@firemypi.org>
> ---
> config/cfgroot/header.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl
> index 2d4aa89f2..1eb7e3b9a 100644
> --- a/config/cfgroot/header.pl
> +++ b/config/cfgroot/header.pl
> @@ -456,7 +456,7 @@ sub genmenu {
>     eval `/bin/cat /var/ipfire/menu.d/*.main`;
> 
>     if (! blue_used()) {
> - $menu->{'05.firewall'}{'subMenu'}->{'60.wireless'}{'enabled'} = 0;
> + $menu->{'05.firewall'}{'subMenu'}->{'70.wireless'}{'enabled'} = 0;
>     }
>     if ( $Network::ethernet{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $Network::ethernet{'RED_TYPE'} eq 'STATIC' ) {
> $menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;
> -- 
> 2.43.0
> 
>
  

Patch

diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl
index 2d4aa89f2..1eb7e3b9a 100644
--- a/config/cfgroot/header.pl
+++ b/config/cfgroot/header.pl
@@ -456,7 +456,7 @@  sub genmenu {
     eval `/bin/cat /var/ipfire/menu.d/*.main`;
 
     if (! blue_used()) {
-	$menu->{'05.firewall'}{'subMenu'}->{'60.wireless'}{'enabled'} = 0;
+	$menu->{'05.firewall'}{'subMenu'}->{'70.wireless'}{'enabled'} = 0;
     }
     if ( $Network::ethernet{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $Network::ethernet{'RED_TYPE'} eq 'STATIC' ) {
 	$menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;