FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 07-02-2008, 02:50 PM
"martin f. krafft"
 
Default 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>
---
scripts/functions | 9 +++++++++
scripts/local | 2 ++
scripts/nfs | 2 ++
3 files changed, 13 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
+}
diff --git a/scripts/local b/scripts/local
index d28917b..dc0745d 100644
--- a/scripts/local
+++ b/scripts/local
@@ -31,6 +31,8 @@ mountroot ()
run_scripts /scripts/local-top
[ "$quiet" != "y" ] && log_end_msg

+ wait_for_udev 10
+
# If the root device hasn't shown up yet, give it a little while
# to deal with removable devices
if [ ! -e "${ROOT}" ] || ! $(get_fstype "${ROOT}" >/dev/null); then
diff --git a/scripts/nfs b/scripts/nfs
index b9c2522..435d2d0 100644
--- a/scripts/nfs
+++ b/scripts/nfs
@@ -59,6 +59,8 @@ mountroot()
# For DHCP
modprobe af_packet

+ wait_for_udev 10
+
# Default delay is around 180s
# FIXME: add usplash_write info
if [ -z "${ROOTDELAY}" ]; then
--
1.5.6


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-02-2008, 10:24 PM
maximilian attems
 
Default Wait for udevsettle after $BOOT-top scripts ran

On Wed, 02 Jul 2008, martin f. krafft wrote:

> 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.

thanks applied.

--
maks


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 01:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org