nixpkgs/upstart-jobs/hal.nix
Eelco Dolstra dca7981111 * Make sure that the FDI cache is flushed on startup. Mine had a
timestamp somewhere in 2008, so apparently it's not getting
  updated.

svn path=/nixos/trunk/; revision=15344
2009-04-27 23:09:25 +00:00

41 lines
740 B
Nix

{stdenv, hal, config}:
{
name = "hal";
users = [
{ name = "haldaemon";
uid = (import ../system/ids.nix).uids.haldaemon;
description = "HAL daemon user";
}
];
groups = [
{ name = "haldaemon";
gid = (import ../system/ids.nix).gids.haldaemon;
}
];
extraPath = [hal];
job = ''
description "HAL daemon"
# !!! TODO: make sure that HAL starts after acpid,
# otherwise hald-addon-acpi will grab /proc/acpi/event.
start on ${if config.powerManagement.enable then "acpid" else "dbus"}
stop on shutdown
start script
mkdir -m 0755 -p /var/cache/hald
rm -f /var/cache/hald/fdi-cache
end script
respawn ${hal}/sbin/hald --daemon=no
'';
}