Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0202-fips-use-small-settle-loop-to-get-boot.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0202-fips-use-small-settle-loop-to-get-boot.patch of Package dracut
From 13e2ceeed95f6348d8d85e8b7df0147138795fe3 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Wed, 13 Apr 2011 14:35:57 +0200 Subject: [PATCH] fips: use small settle loop to get /boot --- modules.d/01fips/fips.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh index 360955c..012c4a0 100755 --- a/modules.d/01fips/fips.sh +++ b/modules.d/01fips/fips.sh @@ -25,12 +25,20 @@ do_fipskernel() if ! [ -e "$boot" ]; then udevadm trigger --action=add >/dev/null 2>&1 [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version) - - if [ $UDEVVERSION -ge 143 ]; then - udevadm settle --exit-if-exists=$boot - else - udevadm settle --timeout=30 - fi + i=0 + while ! [ -e $boot ]; do + if [ $UDEVVERSION -ge 143 ]; then + udevadm settle --exit-if-exists=$boot + else + udevadm settle --timeout=30 + fi + [ -e $boot ] && break + modprobe scsi_wait_scan && rmmod scsi_wait_scan + [ -e $boot ] && break + sleep 0.5 + i=$(($i+1)) + [ $i -gt 40 ] && break + done fi [ -e "$boot" ] || return 1 -- 1.8.3.1