mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/switch-to-configuration: add sysinit-reactivation.target
This commit is contained in:
parent
8bc3b617dd
commit
e6b66f08a5
6 changed files with 160 additions and 4 deletions
|
@ -889,9 +889,15 @@ while (my $f = <$list_active_users>) {
|
|||
|
||||
close($list_active_users) || die("Unable to close the file handle to loginctl");
|
||||
|
||||
# Set the new tmpfiles
|
||||
print STDERR "setting up tmpfiles\n";
|
||||
system("$new_systemd/bin/systemd-tmpfiles", "--create", "--remove", "--exclude-prefix=/dev") == 0 or $res = 3;
|
||||
# Restart sysinit-reactivation.target.
|
||||
# This target only exists to restart services ordered before sysinit.target. We
|
||||
# cannot use X-StopOnReconfiguration to restart sysinit.target because then ALL
|
||||
# services of the system would be restarted since all normal services have a
|
||||
# default dependency on sysinit.target. sysinit-reactivation.target ensures
|
||||
# that services ordered BEFORE sysinit.target get re-started in the correct
|
||||
# order. Ordering between these services is respected.
|
||||
print STDERR "restarting sysinit-reactivation.target\n";
|
||||
system("$new_systemd/bin/systemctl", "restart", "sysinit-reactivation.target") == 0 or $res = 4;
|
||||
|
||||
# Before reloading we need to ensure that the units are still active. They may have been
|
||||
# deactivated because one of their requirements got stopped. If they are inactive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue