]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/cfgroot/header.pl
python3-llfuse: fix rootfile for non x86_64 builds
[ipfire-2.x.git] / config / cfgroot / header.pl
index 7553b01ee16d55c33d6d54e9c07fb15fe9bdc5b7..e8d9d377cb9abfc3997cfcac13602358ed995855 100644 (file)
@@ -99,6 +99,14 @@ require "${swroot}/langs/en.pl";
 require "${swroot}/langs/${language}.pl";
 eval `/bin/cat /srv/web/ipfire/html/themes/$THEME_NAME/include/functions.pl`;
 
+sub green_used() {
+    if ($ethsettings{'GREEN_DEV'} && $ethsettings{'GREEN_DEV'} ne "") {
+        return 1;
+    }
+
+    return 0;
+}
+
 sub orange_used () {
     if ($ethsettings{'CONFIG_TYPE'} =~ /^[24]$/) {
        return 1;
@@ -170,6 +178,13 @@ sub genmenu {
         $menu->{'03.network'}{'subMenu'}->{'80.macadressmenu'}{'enabled'} = 0;
         $menu->{'03.network'}{'subMenu'}->{'90.wakeonlan'}{'enabled'} = 0;
     }
+
+    # Disable proxy when no GREEN is available
+    if (!&green_used()) {
+        $menu->{'03.network'}{'subMenu'}->{'20.proxy'}{'enabled'} = 0;
+        $menu->{'03.network'}{'subMenu'}->{'21.urlfilter'}{'enabled'} = 0;
+        $menu->{'03.network'}{'subMenu'}->{'22.updxlrator'}{'enabled'} = 0;
+    }
   }
 }