switch-to-configuration: Assume that services that are auto-restarting are going to fail

This commit is contained in:
Eelco Dolstra 2012-08-06 15:48:46 -04:00
parent 27f496c1ce
commit d33fd9a1f8

View file

@ -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};
}