* Sat Mar 08 2025 Brian Read <brianr@koozali.org> 11.0.0-64.sme
- Add code to check for boot phase completion [SME: 12953]
This commit is contained in:
parent
4f00dfbdb1
commit
c5d863b3a0
@ -17,6 +17,9 @@ use File::Basename;
|
|||||||
use SrvMngr qw( gen_locale_date_string );
|
use SrvMngr qw( gen_locale_date_string );
|
||||||
our $cdb = esmith::ConfigDB->open or die "Couldn't open ConfigDB\n";
|
our $cdb = esmith::ConfigDB->open or die "Couldn't open ConfigDB\n";
|
||||||
|
|
||||||
|
use constant FALSE => 0;
|
||||||
|
use constant TRUE => 1;
|
||||||
|
|
||||||
# Get some basic info on the current SME install
|
# Get some basic info on the current SME install
|
||||||
our $sysconfig = $cdb->get('sysconfig');
|
our $sysconfig = $cdb->get('sysconfig');
|
||||||
our $systemmode = $cdb->get('SystemMode')->value;
|
our $systemmode = $cdb->get('SystemMode')->value;
|
||||||
@ -124,15 +127,30 @@ sub create_configuration_report {
|
|||||||
print $cfgrep $result;
|
print $cfgrep $result;
|
||||||
close $cfgrep;
|
close $cfgrep;
|
||||||
|
|
||||||
#And create boot analysis image - now run externally by systemd, only run once per boot.
|
#check if boot phase has completed.
|
||||||
$result = `/usr/bin/systemctl start bootsequence.service`;
|
if (wait_for_boot_completion()) {
|
||||||
if (!$? == 0) {
|
#And create boot analysis image - now run externally following boot.
|
||||||
warn "/usr/bin/systemd-analyze plot Command failed \n";
|
$result = `/usr/bin/systemctl start bootsequence.service`;
|
||||||
|
if (!$? == 0) {
|
||||||
|
warn "/usr/bin/systemd-analyze plot Command failed \n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} ## end sub create_configuration_report
|
} ## end sub create_configuration_report
|
||||||
|
|
||||||
|
sub wait_for_boot_completion {
|
||||||
|
my $timeout = 60; # 1-minute timeout
|
||||||
|
my $end_time = time() + $timeout;
|
||||||
|
while (time() < $end_time) {
|
||||||
|
if (`systemctl list-jobs 2>&1` =~ /No jobs running/) {
|
||||||
|
return TRUE; # Success
|
||||||
|
}
|
||||||
|
sleep 5;
|
||||||
|
}
|
||||||
|
warn "Boot did not complete within $timeout seconds.\n";
|
||||||
|
return FALSE; # Failure
|
||||||
|
} ## end wait_for_boot_completion
|
||||||
|
|
||||||
sub show_config_report {
|
sub show_config_report {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
my $out = '';
|
my $out = '';
|
||||||
|
@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2
|
|||||||
%define name smeserver-manager
|
%define name smeserver-manager
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 11.0.0
|
%define version 11.0.0
|
||||||
%define release 63
|
%define release 64
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
@ -143,6 +143,9 @@ true
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 08 2025 Brian Read <brianr@koozali.org> 11.0.0-64.sme
|
||||||
|
- Add code to check for boot phase completion [SME: 12953]
|
||||||
|
|
||||||
* Thu Mar 06 2025 Brian Read <brianr@koozali.org> 11.0.0-63.sme
|
* Thu Mar 06 2025 Brian Read <brianr@koozali.org> 11.0.0-63.sme
|
||||||
- Add boot.svg image to Bug Report panel [SME: 12953]
|
- Add boot.svg image to Bug Report panel [SME: 12953]
|
||||||
- Move report template to inside smanager tree
|
- Move report template to inside smanager tree
|
||||||
|
Loading…
x
Reference in New Issue
Block a user