nixos/switch-to-configuration: Fix dry order

This makes the order of the dry activation messages the same as the real
actions which makes more sense than another random order.
This commit is contained in:
Janne Heß
2021-12-05 18:46:50 +01:00
parent 3693e8b093
commit 1e422e7d58
@@ -381,12 +381,12 @@ if ($action eq "dry-activate") {
split('\n', read_file($dryReloadByActivationFile, err_mode => 'quiet') // "");
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;
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);
unlink($dryReloadByActivationFile);
exit 0;