about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWout Mertens <Wout.Mertens@gmail.com>2023-06-14 12:11:45 +0200
committerGitHub <noreply@github.com>2023-06-14 12:11:45 +0200
commita97fe8990df0809a75c9f37c5de268dc176e292d (patch)
tree1527c886dd19ad27c3e982849d2c67ef4d9b51bc /nixos
parent6d1d80a232a355a65dc4d3bfea1f108e8dac1340 (diff)
downloadnixlib-a97fe8990df0809a75c9f37c5de268dc176e292d.tar
nixlib-a97fe8990df0809a75c9f37c5de268dc176e292d.tar.gz
nixlib-a97fe8990df0809a75c9f37c5de268dc176e292d.tar.bz2
nixlib-a97fe8990df0809a75c9f37c5de268dc176e292d.tar.lz
nixlib-a97fe8990df0809a75c9f37c5de268dc176e292d.tar.xz
nixlib-a97fe8990df0809a75c9f37c5de268dc176e292d.tar.zst
nixlib-a97fe8990df0809a75c9f37c5de268dc176e292d.zip
switch-to-configuration.pl: fix inverted dry-activate logic for swap
Diffstat (limited to 'nixos')
-rwxr-xr-xnixos/modules/system/activation/switch-to-configuration.pl2
1 files changed, 1 insertions, 1 deletions
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";