nixos/switch-to-configuration: Move excludes up

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

View file

@ -218,13 +218,17 @@ while (my ($unit, $state) = each %{$activePrev}) {
}
elsif (fingerprintUnit($prevUnitFile) ne fingerprintUnit($newUnitFile)) {
if ($unit eq "sysinit.target" || $unit eq "basic.target" || $unit eq "multi-user.target" || $unit eq "graphical.target") {
if ($unit eq "sysinit.target" || $unit eq "basic.target" || $unit eq "multi-user.target" || $unit eq "graphical.target" || $unit =~ /\.path$/ || $unit =~ /\.slice$/) {
# Do nothing. These cannot be restarted directly.
# Slices and Paths don't have to be restarted since
# properties (resource limits and inotify watches)
# seem to get applied on daemon-reload.
} elsif ($unit =~ /\.mount$/) {
# Reload the changed mount unit to force a remount.
$unitsToReload{$unit} = 1;
recordUnit($reloadListFile, $unit);
} elsif ($unit =~ /\.socket$/ || $unit =~ /\.path$/ || $unit =~ /\.slice$/) {
} elsif ($unit =~ /\.socket$/) {
# FIXME: do something?
} else {
my $unitInfo = parseUnit($newUnitFile);