* 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
|
start on dbus
|
||||||
stop on shutdown
|
stop on shutdown
|
||||||
|
|
||||||
start script
|
|
||||||
# !!! quick hack: wait until dbus has started
|
|
||||||
sleep 3
|
|
||||||
end script
|
|
||||||
|
|
||||||
respawn ${pkgs.ConsoleKit}/sbin/console-kit-daemon
|
respawn ${pkgs.ConsoleKit}/sbin/console-kit-daemon
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,7 @@ let
|
|||||||
name = "dbus-conf";
|
name = "dbus-conf";
|
||||||
buildCommand = "
|
buildCommand = "
|
||||||
ensureDir $out
|
ensureDir $out
|
||||||
substitute ${dbus}/etc/dbus-1/system.conf $out/system.conf \\
|
ln -s ${dbus}/etc/dbus-1/system.conf $out/system.conf
|
||||||
--replace '<fork/>' ''
|
|
||||||
|
|
||||||
ensureDir $out/system.d
|
ensureDir $out/system.d
|
||||||
for i in ${toString dbusServices}; do
|
for i in ${toString dbusServices}; do
|
||||||
@ -49,13 +48,17 @@ in
|
|||||||
mkdir -m 0755 -p /var/lib/dbus
|
mkdir -m 0755 -p /var/lib/dbus
|
||||||
${dbus.tools}/bin/dbus-uuidgen --ensure
|
${dbus.tools}/bin/dbus-uuidgen --ensure
|
||||||
|
|
||||||
|
rm -f ${homeDir}/pid
|
||||||
|
${dbus}/bin/dbus-daemon --config-file=${configFile}/system.conf
|
||||||
end script
|
end script
|
||||||
|
|
||||||
respawn
|
respawn sleep 1000000
|
||||||
|
|
||||||
script
|
stop script
|
||||||
rm -f ${homeDir}/pid
|
pid=$(cat ${homeDir}/pid)
|
||||||
exec ${dbus}/bin/dbus-daemon --config-file=${configFile}/system.conf
|
if test -n "$pid"; then
|
||||||
|
kill -9 $pid
|
||||||
|
fi
|
||||||
end script
|
end script
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -14,11 +14,6 @@ in
|
|||||||
start on dbus
|
start on dbus
|
||||||
stop on shutdown
|
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'
|
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
|
start script
|
||||||
|
|
||||||
# !!! quick hack: wait until dbus has started
|
|
||||||
sleep 3
|
|
||||||
|
|
||||||
mkdir -m 0755 -p /var/cache/hald
|
mkdir -m 0755 -p /var/cache/hald
|
||||||
|
|
||||||
end script
|
end script
|
||||||
|
Loading…
x
Reference in New Issue
Block a user