Unverified Commit 4cdbb2d8 authored by Janne Heß's avatar Janne Heß
Browse files

nixos/switch-to-configuration: Fix ordering and indentation

This makes the order of operations the same in dry-activate and a "true"
activate. Also fixes the indentation I messed up and drop a useless
unlink() call (we are already unlinking that file earlier).
parent ad09f7be
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -430,18 +430,17 @@ if ($action eq "dry-activate") {
            if scalar @unitsToAlsoStopFiltered;
    }

print STDERR "NOT restarting the following changed units as well: ", join(", ", sort(keys %unitsToAlsoSkip)), "\n"
    print STDERR "would NOT restart the following changed units as well: ", join(", ", sort(keys %unitsToAlsoSkip)), "\n"
        if scalar(keys %unitsToAlsoSkip) > 0;

    print STDERR "would restart systemd\n" if $restartSystemd;
    print STDERR "would reload the following units: ", join(", ", sort(keys %unitsToReload)), "\n"
        if scalar(keys %unitsToReload) > 0;
    print STDERR "would restart the following units: ", join(", ", sort(keys %unitsToRestart)), "\n"
        if scalar(keys %unitsToRestart) > 0;
    my @unitsToStartFiltered = filterUnits(\%unitsToStart);
    print STDERR "would start the following units: ", join(", ", @unitsToStartFiltered), "\n"
        if scalar @unitsToStartFiltered;
    print STDERR "would reload the following units: ", join(", ", sort(keys %unitsToReload)), "\n"
        if scalar(keys %unitsToReload) > 0;
    unlink($dryRestartByActivationFile);
    exit 0;
}