3
0
Fork 0
forked from mirrors/nixpkgs

switch-to-configuration.pl: fix inverted dry-activate logic for swap

This commit is contained in:
Wout Mertens 2023-06-14 12:11:45 +02:00 committed by GitHub
parent 6d1d80a232
commit a97fe8990d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -655,7 +655,7 @@ foreach my $device (keys(%{$cur_swaps})) {
# "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".
if ($action ne "dry-activate") { if ($action eq "dry-activate") {
print STDERR "would stop swap device: $device\n"; print STDERR "would stop swap device: $device\n";
} else { } else {
print STDERR "stopping swap device: $device\n"; print STDERR "stopping swap device: $device\n";