]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ids.cgi: Lock page while autoupdate script is running
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 7 Feb 2019 07:24:15 +0000 (08:24 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 7 Feb 2019 07:24:15 +0000 (08:24 +0100)
Fixes #11991

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 5ed3ed9f2e626193bc633d063a06da2d2f892954..82d79a369b9b0e254535c5961d475731640b8325 100644 (file)
@@ -210,6 +210,22 @@ if (($cgiparams{'WHITELIST'} eq $Lang::tr{'add'}) || ($cgiparams{'WHITELIST'} eq
        }
 }
 
        }
 }
 
+# Check if the page is locked, in this case, the ids_page_lock_file exists.
+if (-e $IDS::ids_page_lock_file) {
+       # Lock the webpage and print notice about autoupgrade of the ruleset
+       # is in progess.
+       &working_notice("$Lang::tr{'ids ruleset autoupdate in progress'}");
+
+       # Loop and check if the file still exists.
+       while(-e $IDS::ids_page_lock_file) {
+               # Sleep for a second and re-check.
+               sleep 1;
+       }
+
+       # Page has been unlocked, perform a reload.
+       &reload();
+}
+
 # Check if any error has been stored.
 if (-e $IDS::storederrorfile) {
         # Open file to read in the stored error message.
 # Check if any error has been stored.
 if (-e $IDS::storederrorfile) {
         # Open file to read in the stored error message.
index 4c934174ff415ee24b4d0a449ecbcfa672a3153d..50731f9156d0d45eee09162a69965cdcf65fa7f5 100644 (file)
 'ids rules license2' => 'Bestätigen Sie die Lizenz; aktivieren Sie Ihren Account, indem Sie auf den Link, den Sie per Mail erhalten haben, klicken. Gehen Sie dann zu',
 'ids rules license3' => 'klicken Sie den "Generate code"-Knopf und kopieren Sie den 40-Zeichen Oinkcode in das untere Feld.',
 'ids rules update' => 'IPS-Regeln',
 'ids rules license2' => 'Bestätigen Sie die Lizenz; aktivieren Sie Ihren Account, indem Sie auf den Link, den Sie per Mail erhalten haben, klicken. Gehen Sie dann zu',
 'ids rules license3' => 'klicken Sie den "Generate code"-Knopf und kopieren Sie den 40-Zeichen Oinkcode in das untere Feld.',
 'ids rules update' => 'IPS-Regeln',
+'ids ruleset autoupdate in progress' => 'Das Regelset wird gerade aktualisiert ... Bitte warten Sie, bis dieser Vorgang erfolgreich beendet wurde.',
 'iface' => 'Iface',
 'ignore filter' => '&quot;Ignorieren&quot;-Filter',
 'ike encryption' => 'IKE Verschlüsselung:',
 'iface' => 'Iface',
 'ignore filter' => '&quot;Ignorieren&quot;-Filter',
 'ike encryption' => 'IKE Verschlüsselung:',
index fa7b7d2f22107295df9d387c3bbde8a6a8c374b0..adfe2350af65d8a0a333468c2f6689b210e5b679 100644 (file)
 'ids rules license2' => 'Acknowledge the license, activate your account by visiting the url you got via mail. Then go to',
 'ids rules license3' => 'press the "Generate code"-button and copy the 40 character Oinkcode into the field below.',
 'ids rules update' => 'IPS rules',
 'ids rules license2' => 'Acknowledge the license, activate your account by visiting the url you got via mail. Then go to',
 'ids rules license3' => 'press the "Generate code"-button and copy the 40 character Oinkcode into the field below.',
 'ids rules update' => 'IPS rules',
+'ids ruleset autoupdate in progress' => 'Ruleset update in progress ... Please wait until all operations have completed successfully.',
 'ids show' => 'Show',
 'iface' => 'Iface',
 'ignore filter' => 'Ignore filter',
 'ids show' => 'Show',
 'iface' => 'Iface',
 'ignore filter' => 'Ignore filter',