* dbus: fork() into the background so that the daemon is
running by the time the job has finished starting. This obviates the need for the sleep hack in other jobs. svn path=/nixos/trunk/; revision=14875
This commit is contained in:
parent
15bff21f68
commit
6663af0833
@ -14,11 +14,6 @@ in
|
||||
start on dbus
|
||||
stop on shutdown
|
||||
|
||||
start script
|
||||
# !!! quick hack: wait until dbus has started
|
||||
sleep 3
|
||||
end script
|
||||
|
||||
respawn ${pkgs.ConsoleKit}/sbin/console-kit-daemon
|
||||
'';
|
||||
}
|
||||
|
@ -10,8 +10,7 @@ let
|
||||
name = "dbus-conf";
|
||||
buildCommand = "
|
||||
ensureDir $out
|
||||
substitute ${dbus}/etc/dbus-1/system.conf $out/system.conf \\
|
||||
--replace '<fork/>' ''
|
||||
ln -s ${dbus}/etc/dbus-1/system.conf $out/system.conf
|
||||
|
||||
ensureDir $out/system.d
|
||||
for i in ${toString dbusServices}; do
|
||||
@ -49,13 +48,17 @@ in
|
||||
mkdir -m 0755 -p /var/lib/dbus
|
||||
${dbus.tools}/bin/dbus-uuidgen --ensure
|
||||
|
||||
rm -f ${homeDir}/pid
|
||||
${dbus}/bin/dbus-daemon --config-file=${configFile}/system.conf
|
||||
end script
|
||||
|
||||
respawn
|
||||
respawn sleep 1000000
|
||||
|
||||
script
|
||||
rm -f ${homeDir}/pid
|
||||
exec ${dbus}/bin/dbus-daemon --config-file=${configFile}/system.conf
|
||||
stop script
|
||||
pid=$(cat ${homeDir}/pid)
|
||||
if test -n "$pid"; then
|
||||
kill -9 $pid
|
||||
fi
|
||||
end script
|
||||
'';
|
||||
|
||||
|
@ -14,11 +14,6 @@ in
|
||||
start on dbus
|
||||
stop on shutdown
|
||||
|
||||
start script
|
||||
# !!! quick hack: wait until dbus has started
|
||||
sleep 3
|
||||
end script
|
||||
|
||||
respawn ${pkgs.bash}/bin/sh -c 'export PATH=/var/run/current-system/sw/bin:$PATH; export HOME=/root; export DISNIX_ACTIVATE_HOOK=${cfg.activateHook}; export DISNIX_DEACTIVATE_HOOK=${cfg.deactivateHook}; ${pkgs.disnix}/bin/disnix-service'
|
||||
'';
|
||||
}
|
||||
|
@ -28,9 +28,6 @@
|
||||
|
||||
start script
|
||||
|
||||
# !!! quick hack: wait until dbus has started
|
||||
sleep 3
|
||||
|
||||
mkdir -m 0755 -p /var/cache/hald
|
||||
|
||||
end script
|
||||
|
Loading…
Reference in New Issue
Block a user