mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
nixos/switch-to-configuration: Clean perl code
oct() is recommended by perlcritic and the rest was unused.
This commit is contained in:
parent
50a0f33c2a
commit
3693e8b093
@ -24,7 +24,7 @@ my $reloadByActivationFile = "/run/nixos/activation-reload-list";
|
|||||||
my $dryRestartByActivationFile = "/run/nixos/dry-activation-restart-list";
|
my $dryRestartByActivationFile = "/run/nixos/dry-activation-restart-list";
|
||||||
my $dryReloadByActivationFile = "/run/nixos/dry-activation-reload-list";
|
my $dryReloadByActivationFile = "/run/nixos/dry-activation-reload-list";
|
||||||
|
|
||||||
make_path("/run/nixos", { mode => 0755 });
|
make_path("/run/nixos", { mode => oct(755) });
|
||||||
|
|
||||||
my $action = shift @ARGV;
|
my $action = shift @ARGV;
|
||||||
|
|
||||||
@ -484,7 +484,7 @@ unlink($startListFile);
|
|||||||
|
|
||||||
|
|
||||||
# Print failed and new units.
|
# Print failed and new units.
|
||||||
my (@failed, @new, @restarting);
|
my (@failed, @new);
|
||||||
my $activeNew = getActiveUnits;
|
my $activeNew = getActiveUnits;
|
||||||
while (my ($unit, $state) = each %{$activeNew}) {
|
while (my ($unit, $state) = each %{$activeNew}) {
|
||||||
if ($state->{state} eq "failed") {
|
if ($state->{state} eq "failed") {
|
||||||
|
Loading…
Reference in New Issue
Block a user