* 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:
parent
3f65f9ee55
commit
3e71bd9731
|
@ -26,6 +26,15 @@ let
|
||||||
udev_rules=\"${udevRules}\"
|
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
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -49,8 +58,11 @@ start script
|
||||||
# Let udev create device nodes for all modules that have already
|
# Let udev create device nodes for all modules that have already
|
||||||
# been loaded into the kernel (or for which support is built into
|
# been loaded into the kernel (or for which support is built into
|
||||||
# the kernel).
|
# the kernel).
|
||||||
${udev}/sbin/udevtrigger
|
if ! test -e ${devicesCreated}; then
|
||||||
${udev}/sbin/udevsettle # wait for udev to finish
|
${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,
|
# Kill udev, let Upstart restart and monitor it. (This is nasty,
|
||||||
# but we have to run udevtrigger first. Maybe we can use
|
# but we have to run udevtrigger first. Maybe we can use
|
||||||
|
|
Loading…
Reference in New Issue