mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/switch-to-configuration: Restart systemd when system.conf is changed
This commit is contained in:
parent
08586ff592
commit
1f41365cda
1 changed files with 6 additions and 0 deletions
|
@ -351,8 +351,14 @@ foreach my $device (keys %$prevSwaps) {
|
|||
|
||||
# Should we have systemd re-exec itself?
|
||||
my $prevSystemd = abs_path("/proc/1/exe") // "/unknown";
|
||||
my $prevSystemdSystemConfig = abs_path("/etc/systemd/system.conf") // "/unknown";
|
||||
my $newSystemd = abs_path("@systemd@/lib/systemd/systemd") or die;
|
||||
my $newSystemdSystemConfig = abs_path("$out/etc/systemd/system.conf") // "/unknown";
|
||||
|
||||
my $restartSystemd = $prevSystemd ne $newSystemd;
|
||||
if ($prevSystemdSystemConfig ne $newSystemdSystemConfig) {
|
||||
$restartSystemd = 1;
|
||||
}
|
||||
|
||||
|
||||
sub filterUnits {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue