From feeff52285d3e66bcaddf3283be1ff88c6eee973 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Oct 2009 09:41:32 +0000 Subject: [PATCH] * Ugly hack to get HAL to start at boot time. Sometimes it fails without any error message in the log (maybe ConsoleKit related?). svn path=/nixos/trunk/; revision=17907 --- modules/services/hardware/hal.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/services/hardware/hal.nix b/modules/services/hardware/hal.nix index 5ac01d3b098..11cda8d4cc4 100644 --- a/modules/services/hardware/hal.nix +++ b/modules/services/hardware/hal.nix @@ -100,6 +100,11 @@ in rm -f /var/cache/hald/fdi-cache + # For some weird reason HAL sometimes fails to start at + # boot time, which seems to be timing-dependent. As a + # temporary workaround, sleep for a while here. + sleep 2 + # !!! Hack: start the daemon here to make sure it's # running when the Upstart job reaches the "running" # state. Should be fixable in Upstart 0.6. @@ -108,7 +113,7 @@ in postStop = '' - pid=$(cat /var/run/hald/pid) + pid=$(cat /var/run/hald/pid || true) test -n "$pid" && kill "$pid" ''; };