nixos-rebuild: reload dbus before starting other units. Closes #4546
This commit is contained in:
parent
8b949e5ff5
commit
510fba95e8
@ -321,6 +321,10 @@ system("@systemd@/bin/systemctl", "reset-failed");
|
|||||||
# Make systemd reload its units.
|
# Make systemd reload its units.
|
||||||
system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3;
|
system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3;
|
||||||
|
|
||||||
|
# Signal dbus to reload its configuration before starting other units.
|
||||||
|
# Other units may rely on newly installed policy files under /etc/dbus-1
|
||||||
|
system("@systemd@/bin/systemctl", "reload", "dbus.service");
|
||||||
|
|
||||||
# Restart changed services (those that have to be restarted rather
|
# Restart changed services (those that have to be restarted rather
|
||||||
# than stopped and started).
|
# than stopped and started).
|
||||||
my @restart = unique(split('\n', read_file($restartListFile, err_mode => 'quiet') // ""));
|
my @restart = unique(split('\n', read_file($restartListFile, err_mode => 'quiet') // ""));
|
||||||
@ -350,8 +354,6 @@ if (scalar @reload > 0) {
|
|||||||
unlink($reloadListFile);
|
unlink($reloadListFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Signal dbus to reload its configuration.
|
|
||||||
system("@systemd@/bin/systemctl", "reload", "dbus.service");
|
|
||||||
|
|
||||||
# Print failed and new units.
|
# Print failed and new units.
|
||||||
my (@failed, @new, @restarting);
|
my (@failed, @new, @restarting);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user