summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-11-02 23:02:45 +0100
committerAristid Breitkreuz <aristidb@gmail.com>2014-11-08 19:40:28 +0100
commit510fba95e84e9b1fc7a96b48bbfc83d7b3b5172e (patch)
treef0a8789aa5cd7971d72df3d84a9da57edaf6ddf8 /nixos
parent8b949e5ff5292445dea17a70ab9722b66083c273 (diff)
nixos-rebuild: reload dbus before starting other units. Closes #4546
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/activation/switch-to-configuration.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl
index 12012698efe3..c0e0ae23d387 100644
--- a/nixos/modules/system/activation/switch-to-configuration.pl
+++ b/nixos/modules/system/activation/switch-to-configuration.pl
@@ -321,6 +321,10 @@ system("@systemd@/bin/systemctl", "reset-failed");
# Make systemd reload its units.
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
# than stopped and started).
my @restart = unique(split('\n', read_file($restartListFile, err_mode => 'quiet') // ""));
@@ -350,8 +354,6 @@ if (scalar @reload > 0) {
unlink($reloadListFile);
}
-# Signal dbus to reload its configuration.
-system("@systemd@/bin/systemctl", "reload", "dbus.service");
# Print failed and new units.
my (@failed, @new, @restarting);