mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
switch-to-configuration: Assume that services that are auto-restarting are going to fail
This commit is contained in:
parent
27f496c1ce
commit
d33fd9a1f8
@ -124,10 +124,10 @@ if (scalar @stopped > 0) {
|
||||
system("@systemd@/bin/systemctl", "reload", "dbus.service");
|
||||
|
||||
# Print failed and new units.
|
||||
my (@failed, @new);
|
||||
my (@failed, @new, @restarting);
|
||||
my $activeNew = getActiveUnits;
|
||||
while (my ($unit, $state) = each %{$activeNew}) {
|
||||
push @failed, $unit if $state->{state} eq "failed";
|
||||
push @failed, $unit if $state->{state} eq "failed" || $state->{substate} eq "auto-restart";
|
||||
push @new, $unit if $state->{state} ne "failed" && !defined $activePrev->{$unit};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user