From a97fe8990df0809a75c9f37c5de268dc176e292d Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Wed, 14 Jun 2023 12:11:45 +0200 Subject: [PATCH] switch-to-configuration.pl: fix inverted dry-activate logic for swap --- nixos/modules/system/activation/switch-to-configuration.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index de6e43dd30d8..a77a6ed52ebb 100755 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -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";