dracut/0080-dracut.sh-test-if-we-can-lazy-resolve-with-ldd.patch
Harald Hoyer 811c04a7e9 dracut-022-97.git20120730
- moved crypt setup to systemd units
2012-07-30 21:53:48 +02:00

34 lines
984 B
Diff

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