Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0179-fips-only-trigger-udev-if-boot-device-is-not-yet-pre.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0179-fips-only-trigger-udev-if-boot-device-is-not-yet-pre.patch of Package dracut
From cf3d51ba6a722064e1155672ccbdb91a9f858188 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Fri, 4 Mar 2011 11:31:02 +0100 Subject: [PATCH] fips: only trigger udev, if boot device is not yet present --- modules.d/01fips/fips.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh index 8efedc2..c42159e 100755 --- a/modules.d/01fips/fips.sh +++ b/modules.d/01fips/fips.sh @@ -4,7 +4,6 @@ do_fips() FIPSMODULES=$(cat /etc/fipsmodules) BOOT=$(getarg boot=) KERNEL=$(uname -r) - udevadm trigger >/dev/null 2>&1 case "$boot" in block:LABEL=*|LABEL=*) boot="${boot#block:}" @@ -17,14 +16,19 @@ do_fips() bootok=1 ;; /dev/*) bootok=1 ;; + *) + die "You have to specify boot=<boot device> as a boot option for fips=1" ;; esac - [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version) + if ! [ -e "$boot" ]; then + udevadm trigger >/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 + if [ $UDEVVERSION -ge 143 ]; then + udevadm settle --exit-if-exists=$boot + else + udevadm settle --timeout=30 + fi fi [ -e "$boot" ] -- 1.8.3.1