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
# units that prevent a stop from actually calling
# "swapoff".
if ($action ne "dry-activate") {
if ($action eq "dry-activate") {
print STDERR "would stop swap device: $device\n";
} else {
print STDERR "stopping swap device: $device\n";