[LON-CAPA-cvs] cvs: doc /install/linux install.pl

raeburn raeburn at source.lon-capa.org
Wed Apr 24 19:17:48 EDT 2024


raeburn		Wed Apr 24 23:17:48 2024 EDT

  Modified files:              
    /doc/install/linux	install.pl 
  Log:
  - Support Ubuntu 22 and 24 (using ufw).
  
  
Index: doc/install/linux/install.pl
diff -u doc/install/linux/install.pl:1.83 doc/install/linux/install.pl:1.84
--- doc/install/linux/install.pl:1.83	Fri Apr 28 19:33:48 2023
+++ doc/install/linux/install.pl	Wed Apr 24 23:17:48 2024
@@ -78,7 +78,7 @@
           &mt('Stopping execution.')."\n";
     exit;
 } else {
-    print LOG '$Id: install.pl,v 1.83 2023/04/28 19:33:48 raeburn Exp $'."\n";
+    print LOG '$Id: install.pl,v 1.84 2024/04/24 23:17:48 raeburn Exp $'."\n";
 }
 
 #
@@ -1700,14 +1700,30 @@
 
 sub firewall_is_active {
     if (-e '/proc/net/ip_tables_names') {
+        my $status;
         if (open(PIPE,'cat /proc/net/ip_tables_names |grep filter |')) {
-            my $status = <PIPE>;
+            $status = <PIPE>;
             close(PIPE);
             chomp($status);
             if ($status eq 'filter') {
                 return 1;
             }
         }
+        unless ($status) {
+            if (open(PIPE,'nft list tables |')) {
+                while(<PIPE>) {
+                    chomp();
+                    if (/filter$/) {
+                        $status = 1;
+                        last;
+                    }
+                }
+                close(PIPE);
+                if ($status) {
+                    return 1;
+                }
+            }
+        }
     }
     return 0;
 }




More information about the LON-CAPA-cvs mailing list