* Wait until the temporary udevd is gone.
svn path=/nixos/trunk/; revision=7457
This commit is contained in:
parent
d54b0a0749
commit
e3acce2f4f
@ -20,6 +20,9 @@ env UDEV_CONFIG_FILE=${conf}
|
|||||||
start script
|
start script
|
||||||
echo '' > /proc/sys/kernel/hotplug
|
echo '' > /proc/sys/kernel/hotplug
|
||||||
|
|
||||||
|
# Get rid of possible old udev processes.
|
||||||
|
${procps}/bin/pkill -u root '^udevd$' || true
|
||||||
|
|
||||||
# Start udev.
|
# Start udev.
|
||||||
${udev}/sbin/udevd --daemon
|
${udev}/sbin/udevd --daemon
|
||||||
|
|
||||||
@ -32,10 +35,14 @@ start script
|
|||||||
# 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
|
||||||
# Upstart's `binary' keyword, but it isn't implemented yet.)
|
# 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\"
|
echo \"couldn't stop udevd\"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
while ${procps}/bin/pgrep -u root '^udevd$'; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
initctl emit new-devices
|
initctl emit new-devices
|
||||||
end script
|
end script
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user