0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos/switch-to-configuration: Ignore slice units

This commit is contained in:
Janne Heß 2021-10-10 17:58:06 +02:00
parent b515bae5cf
commit de128feacc
No known key found for this signature in database
GPG key ID: 69165158F05265DF
2 changed files with 36 additions and 2 deletions

View file

@ -152,7 +152,7 @@ sub fingerprintUnit {
sub handleModifiedUnit {
my ($unit, $baseName, $newUnitFile, $activePrev, $unitsToStop, $unitsToStart, $unitsToReload, $unitsToRestart, $unitsToSkip) = @_;
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 =~ /\.slice$/) {
# Do nothing. These cannot be restarted directly.
# Slices and Paths don't have to be restarted since
# properties (resource limits and inotify watches)
@ -161,7 +161,7 @@ sub handleModifiedUnit {
# Reload the changed mount unit to force a remount.
$unitsToReload->{$unit} = 1;
recordUnit($reloadListFile, $unit);
} elsif ($unit =~ /\.slice$/ || $unit =~ /\.path$/) {
} elsif ($unit =~ /\.path$/) {
# FIXME: do something?
} else {
my $unitInfo = parseUnit($newUnitFile);