nixos/switch-to-configuration: Ignore scopes

This commit is contained in:
Janne Heß 2021-12-05 18:47:35 +01:00
parent 1e422e7d58
commit 5d34545954
No known key found for this signature in database
GPG key ID: 69165158F05265DF

View file

@ -500,7 +500,9 @@ while (my ($unit, $state) = each %{$activeNew}) {
push @failed, $unit;
}
}
elsif ($state->{state} ne "failed" && !defined $activePrev->{$unit}) {
# Ignore scopes since they are not managed by this script but rather
# created and managed by third-party services via the systemd dbus API.
elsif ($state->{state} ne "failed" && !defined $activePrev->{$unit} && $unit !~ /\.scope$/) {
push @new, $unit;
}
}