From 408660f945441f0978e6415de131530c7d384070 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 31 Jul 2012 11:52:11 -0500 Subject: Allow an optional wait for uevent processing Systemd allows the wait for uevents during boot to be optional, so we should do the same. --- conf.d/udev | 8 ++++++++ init.d/udev | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/conf.d/udev b/conf.d/udev index 1dfdc79..921d86b 100644 --- a/conf.d/udev +++ b/conf.d/udev @@ -13,6 +13,14 @@ # Expert options: +# Should we wait for all uevents to be processed at boot? +# Most of the time, this should not need to be changed. +#udev_settle_wait="NO" + +# Timeout in seconds to wait for processing of uevents at boot. +# There should be no need to change this. +#udev_settle_timeout="60" + # Add extra command line options to udevd, use with care # udevd --help for possible values #udev_opts="" diff --git a/init.d/udev b/init.d/udev index 20b52d9..4985d5d 100644 --- a/init.d/udev +++ b/init.d/udev @@ -10,6 +10,7 @@ rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}} udev_debug="${udev_debug:-no}" udev_monitor="${udev_monitor:-no}" udev_monitor_keep_running="${udev_monitor_keep_running:-no}" +udev_settle_wait="${udev_settle_wait:-NO}" udev_settle_timeout="${udev_settle_timeout:-60}" kv_min="${kv_min:-2.6.34}" @@ -137,7 +138,11 @@ populate_dev() udevadm trigger --type=subsystems --action=add udevadm trigger --type=devices --action=add eend $? - + if yesno "${udev_settle_wait}"; then + ebegin "Waiting for uevents to be processed" + udevadm settle --timeout=${udev_settle_timeout} + eend $? + fi udevadm control --property=do_not_run_plug_service= return 0 } -- cgit v1.2.3-65-gdbad