mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/switch-to-configuration: don't try restart deleted sockets
This commit is contained in:
parent
3175628b30
commit
77b7d29bf8
1 changed files with 7 additions and 3 deletions
|
@ -243,9 +243,13 @@ while (my ($unit, $state) = each %{$activePrev}) {
|
||||||
foreach my $socket (@sockets) {
|
foreach my $socket (@sockets) {
|
||||||
if (defined $activePrev->{$socket}) {
|
if (defined $activePrev->{$socket}) {
|
||||||
$unitsToStop{$socket} = 1;
|
$unitsToStop{$socket} = 1;
|
||||||
$unitsToStart{$socket} = 1;
|
# Only restart sockets that actually
|
||||||
recordUnit($startListFile, $socket);
|
# exist in new configuration:
|
||||||
$socketActivated = 1;
|
if (-e "$out/etc/systemd/system/$socket") {
|
||||||
|
$unitsToStart{$socket} = 1;
|
||||||
|
recordUnit($startListFile, $socket);
|
||||||
|
$socketActivated = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue