* Wait until the temporary udevd is gone.

svn path=/nixos/trunk/; revision=7457
This commit is contained in:
Eelco Dolstra 2006-12-21 20:07:46 +00:00
parent d54b0a0749
commit e3acce2f4f

View File

@ -20,6 +20,9 @@ env UDEV_CONFIG_FILE=${conf}
start script
echo '' > /proc/sys/kernel/hotplug
# Get rid of possible old udev processes.
${procps}/bin/pkill -u root '^udevd$' || true
# Start udev.
${udev}/sbin/udevd --daemon
@ -32,10 +35,14 @@ start script
# Kill udev, let Upstart restart and monitor it. (This is nasty,
# but we have to run udevtrigger first. Maybe we can use
# Upstart's `binary' keyword, but it isn't implemented yet.)
if ${procps}/bin/pkill -u root '^udevd$'; then
if ! ${procps}/bin/pkill -u root '^udevd$'; then
echo \"couldn't stop udevd\"
fi
while ${procps}/bin/pgrep -u root '^udevd$'; do
sleep 1
done
initctl emit new-devices
end script