* Quick hack to prevent the udev job from messing up the device

ownership of logged-in users.

svn path=/nixos/trunk/; revision=8530
This commit is contained in:
Eelco Dolstra 2007-04-02 15:00:31 +00:00
parent 3f65f9ee55
commit 3e71bd9731

View File

@ -26,6 +26,15 @@ let
udev_rules=\"${udevRules}\"
";
# Dummy file indicating whether we've run udevtrigger/udevsettle.
# Since that *recreates* all device nodes with default permissions,
# it's not nice to do that when a user is logged in (it messes up
# the permissions set by pam_devperm).
# !!! Actually, this makes the udev configuration less declarative;
# changes may not take effect until the user reboots. We should
# find a better way to preserve the permissions of logged-in users.
devicesCreated = "/var/run/devices-created";
in
{
@ -49,8 +58,11 @@ start script
# Let udev create device nodes for all modules that have already
# been loaded into the kernel (or for which support is built into
# the kernel).
${udev}/sbin/udevtrigger
${udev}/sbin/udevsettle # wait for udev to finish
if ! test -e ${devicesCreated}; then
${udev}/sbin/udevtrigger
${udev}/sbin/udevsettle # wait for udev to finish
touch ${devicesCreated}
fi
# Kill udev, let Upstart restart and monitor it. (This is nasty,
# but we have to run udevtrigger first. Maybe we can use