Blame 0080-dracut.sh-test-if-we-can-lazy-resolve-with-ldd.patch

Harald Hoyer 811c04
From bfd2e8c25ffc68bb98ca62049d709f378ac2ff1d Mon Sep 17 00:00:00 2001
Harald Hoyer 811c04
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 811c04
Date: Mon, 30 Jul 2012 13:02:41 +0200
Harald Hoyer 811c04
Subject: [PATCH] dracut.sh: test if we can lazy resolve with ldd
Harald Hoyer 811c04
Harald Hoyer 811c04
---
Harald Hoyer 811c04
 dracut.sh | 9 ++++++++-
Harald Hoyer 811c04
 1 file changed, 8 insertions(+), 1 deletion(-)
Harald Hoyer 811c04
Harald Hoyer 811c04
diff --git a/dracut.sh b/dracut.sh
Harald Hoyer 811c04
index 1bbec3d..46f3a5b 100755
Harald Hoyer 811c04
--- a/dracut.sh
Harald Hoyer 811c04
+++ b/dracut.sh
Harald Hoyer 811c04
@@ -600,11 +600,18 @@ else
Harald Hoyer 811c04
     exit 1
Harald Hoyer 811c04
 fi
Harald Hoyer 811c04
 
Harald Hoyer 811c04
+inst /bin/sh
Harald Hoyer 811c04
+if ! $DRACUT_INSTALL ${initdir+-D "$initdir"} -R "$initdir/bin/sh" &>/dev/null; then
Harald Hoyer 811c04
+    unset DRACUT_RESOLVE_LAZY
Harald Hoyer 811c04
+    export DRACUT_RESOLVE_DEPS=1
Harald Hoyer 811c04
+fi
Harald Hoyer 811c04
+rm -fr ${initdir}/*
Harald Hoyer 811c04
+
Harald Hoyer 811c04
 if [[ -f $dracutbasedir/dracut-version.sh ]]; then
Harald Hoyer 811c04
     . $dracutbasedir/dracut-version.sh
Harald Hoyer 811c04
 fi
Harald Hoyer 811c04
 
Harald Hoyer 811c04
-# Verify bash version, curret minimum is 3.1
Harald Hoyer 811c04
+# Verify bash version, current minimum is 3.1
Harald Hoyer 811c04
 if (( ${BASH_VERSINFO[0]} < 3 ||
Harald Hoyer 811c04
     ( ${BASH_VERSINFO[0]} == 3 && ${BASH_VERSINFO[1]} < 1 ) )); then
Harald Hoyer 811c04
     dfatal 'You need at least Bash 3.1 to use dracut, sorry.'