fips/fips.sh: only trigger udev, if device node of boot is not present

master
Harald Hoyer 2011-03-07 13:13:00 +01:00
parent 62d0c4e7c1
commit 674bdee804
1 changed files with 9 additions and 7 deletions

View File

@ -6,7 +6,6 @@ do_fips()
FIPSMODULES=$(cat /etc/fipsmodules) FIPSMODULES=$(cat /etc/fipsmodules)
BOOT=$(getarg boot=) BOOT=$(getarg boot=)
KERNEL=$(uname -r) KERNEL=$(uname -r)
udevadm trigger --action=add >/dev/null 2>&1
case "$boot" in case "$boot" in
block:LABEL=*|LABEL=*) block:LABEL=*|LABEL=*)
boot="${boot#block:}" boot="${boot#block:}"
@ -21,6 +20,8 @@ do_fips()
bootok=1 ;; bootok=1 ;;
esac esac


if ! [ -e "$boot" ]; then
udevadm trigger --action=add >/dev/null 2>&1
[ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version) [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version)


if [ $UDEVVERSION -ge 143 ]; then if [ $UDEVVERSION -ge 143 ]; then
@ -28,6 +29,7 @@ do_fips()
else else
udevadm settle --timeout=30 udevadm settle --timeout=30
fi fi
fi


[ -e "$boot" ] [ -e "$boot" ]