diff options
author | martin f. krafft <madduck@debian.org> | 2008-07-02 16:50:15 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2008-07-03 00:19:16 +0200 |
commit | fc24059a296ecba82475debde0eff2330c92a2cd (patch) | |
tree | c7f6c56247a7e2346eeab84645e709798e77d9b8 /scripts/functions | |
parent | 7e5cad4b55f4e3ca20bb0f4dbaeaf3d6b9e7b8d7 (diff) | |
download | initramfs-tools-fc24059a296ecba82475debde0eff2330c92a2cd.tar.gz initramfs-tools-fc24059a296ecba82475debde0eff2330c92a2cd.zip |
Wait for udevsettle after $BOOT-top scripts ran
udev may be busy creating links for the root device by the time
mountroot is called. udevsettle makes sure these are processed. I thus
call udevsettle with a timeout of 10 seconds after the $BOOT-top
scripts have run and before the ROOTDELAY hack kicks in.
I thought about doing this with a local-top script instead, but there is
no way to ensure that it'll run last; cryptsetup uses a hack to make
sure it runs last, if we also use the same hack, there'll be
a dependency loop.
Signed-off-by: martin f. krafft <madduck@debian.org>
Signed-off-by: maximilian attems <maks@debian.org>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions index d36884c..558f521 100644 --- a/scripts/functions +++ b/scripts/functions @@ -313,3 +313,12 @@ configure_networking() . /tmp/net-*.conf fi } + +wait_for_udev() +{ + if [ -x "$(command -v udevsettle)" ]; then + [ "$quiet" != "y" ] && log_begin_msg "Waiting for udev to process events" + udevsettle ${1:+--timeout=$1} + [ "$quiet" != "y" ] && log_end_msg + fi +} |