From: Harald Hoyer Date: Mon, 7 Mar 2011 12:13:00 +0000 (+0100) Subject: fips/fips.sh: only trigger udev, if device node of boot is not present X-Git-Tag: 009~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=674bdee8040b362d2a3c6c5af4e35a134a96e157;p=thirdparty%2Fdracut.git fips/fips.sh: only trigger udev, if device node of boot is not present --- diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh index c51b16c13..a8db43b78 100755 --- a/modules.d/01fips/fips.sh +++ b/modules.d/01fips/fips.sh @@ -6,7 +6,6 @@ do_fips() FIPSMODULES=$(cat /etc/fipsmodules) BOOT=$(getarg boot=) KERNEL=$(uname -r) - udevadm trigger --action=add >/dev/null 2>&1 case "$boot" in block:LABEL=*|LABEL=*) boot="${boot#block:}" @@ -21,12 +20,15 @@ do_fips() bootok=1 ;; esac - [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version) - - if [ $UDEVVERSION -ge 143 ]; then - udevadm settle --exit-if-exists=$boot - else - udevadm settle --timeout=30 + 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 fi [ -e "$boot" ]