From: Stefan Schantl Date: Sat, 26 Mar 2022 10:22:50 +0000 (+0100) Subject: update-ids-ruleset: Log and abort if to less free disk space is X-Git-Tag: v2.27-core170~195^2~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a3f9c2b234457e6cfda54f7ee3746781ba503b5;p=ipfire-2.x.git update-ids-ruleset: Log and abort if to less free disk space is available. Signed-off-by: Stefan Schantl --- diff --git a/src/scripts/update-ids-ruleset b/src/scripts/update-ids-ruleset index 267ccdb254..9453f8f8e1 100644 --- a/src/scripts/update-ids-ruleset +++ b/src/scripts/update-ids-ruleset @@ -65,19 +65,19 @@ if (-f "$IDS::ids_page_lock_file") { # Check if the red device is active. unless (-e "${General::swroot}/red/active") { # Store notice in the syslog. - &IDS::_log_to_syslog("The system is offline."); - - # Store error message for displaying in the WUI. - &IDS::_store_error_message("$Lang::tr{'could not download latest updates'} - $Lang::tr{'system is offline'}"); + &_log_to_syslog(" Could not update any ruleset - The system is offline."); # Exit. exit 0; } # Check if enought free disk space is availabe. -if(&IDS::checkdiskspace()) { - # Store the error message for displaying in the WUI. - &IDS::_store_error_message("$Lang::tr{'not enough disk space'}"); +my $return = &IDS::checkdiskspace(); + +# Handle error. +if ($return) { + # Store error in syslog. + &_log_to_syslog(" Not enough free disk space, only $return of 300MB are available."); # Exit. exit 0;