nixos/switch-to-configuration: Don't stop swaps in dry-activate
This commit is contained in:
parent
1c1f8c59e1
commit
08cd8ab8b6
@ -507,8 +507,12 @@ foreach my $device (keys %$prevSwaps) {
|
|||||||
# "systemctl stop" here because systemd has lots of alias
|
# "systemctl stop" here because systemd has lots of alias
|
||||||
# units that prevent a stop from actually calling
|
# units that prevent a stop from actually calling
|
||||||
# "swapoff".
|
# "swapoff".
|
||||||
print STDERR "stopping swap device: $device\n";
|
if ($action ne "dry-activate") {
|
||||||
system("@utillinux@/sbin/swapoff", $device);
|
print STDERR "would stop swap device: $device\n";
|
||||||
|
} else {
|
||||||
|
print STDERR "stopping swap device: $device\n";
|
||||||
|
system("@utillinux@/sbin/swapoff", $device);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# FIXME: update swap options (i.e. its priority).
|
# FIXME: update swap options (i.e. its priority).
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user