From b9bfe7ed43e0839d54708de21639feb1173eb0dd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 6 Nov 2009 15:59:23 +0000 Subject: [PATCH] * Connect Upstart to the system bus. svn path=/nixos/branches/upstart-0.6/; revision=18213 --- modules/services/system/dbus.nix | 6 ++++++ modules/system/upstart/upstart.nix | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/modules/services/system/dbus.nix b/modules/services/system/dbus.nix index b0c8dc66ae50..6f79865645db 100644 --- a/modules/services/system/dbus.nix +++ b/modules/services/system/dbus.nix @@ -130,6 +130,12 @@ in exec = "${dbus}/bin/dbus-daemon --config-file=${configDir}/system.conf"; + postStart = + '' + # Signal Upstart that it can connect to the system bus. + kill -HUP 1 || true + ''; + postStop = '' # !!! Hack: doesn't belong here. diff --git a/modules/system/upstart/upstart.nix b/modules/system/upstart/upstart.nix index 9edb0153cb27..3d2af1b0382f 100644 --- a/modules/system/upstart/upstart.nix +++ b/modules/system/upstart/upstart.nix @@ -311,6 +311,10 @@ in target = "init/${job.name}.conf"; } ); + # Upstart can listen on the system bus, allowing normal users to + # do status queries. + services.dbus.packages = [ upstart ]; + # !!! fix this /* tests.upstartJobs = { recurseForDerivations = true; } //