about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJanne Heß <dasJ@users.noreply.github.com>2023-06-14 14:45:35 +0200
committerGitHub <noreply@github.com>2023-06-14 14:45:35 +0200
commit1ee0ab1b79adc8247c920046cea84d9569205511 (patch)
tree562bf572df66a26a6113705d530449d300b1e280 /nixos
parent28ac32637220e90cbc3b3dabcd572b6fc725cbb3 (diff)
parenta97fe8990df0809a75c9f37c5de268dc176e292d (diff)
downloadnixlib-1ee0ab1b79adc8247c920046cea84d9569205511.tar
nixlib-1ee0ab1b79adc8247c920046cea84d9569205511.tar.gz
nixlib-1ee0ab1b79adc8247c920046cea84d9569205511.tar.bz2
nixlib-1ee0ab1b79adc8247c920046cea84d9569205511.tar.lz
nixlib-1ee0ab1b79adc8247c920046cea84d9569205511.tar.xz
nixlib-1ee0ab1b79adc8247c920046cea84d9569205511.tar.zst
nixlib-1ee0ab1b79adc8247c920046cea84d9569205511.zip
Merge pull request #237720 from NixOS/swap-dry-activate
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";