Blame 0078-dracut-functions.sh-fixed-dracutbasedir-when-sourced.patch

Harald Hoyer bb31e7
From ea877ac6cc3df38d22728437b8a70bedee558f6a Mon Sep 17 00:00:00 2001
Harald Hoyer bb31e7
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer bb31e7
Date: Thu, 3 Sep 2015 12:31:34 +0200
Harald Hoyer bb31e7
Subject: [PATCH] dracut-functions.sh: fixed dracutbasedir, when sourced
Harald Hoyer bb31e7
 directly
Harald Hoyer bb31e7
Harald Hoyer bb31e7
---
Harald Hoyer bb31e7
 dracut-functions.sh | 2 +-
Harald Hoyer bb31e7
 1 file changed, 1 insertion(+), 1 deletion(-)
Harald Hoyer bb31e7
Harald Hoyer bb31e7
diff --git a/dracut-functions.sh b/dracut-functions.sh
Harald Hoyer bb31e7
index d559903..3982fc8 100755
Harald Hoyer bb31e7
--- a/dracut-functions.sh
Harald Hoyer bb31e7
+++ b/dracut-functions.sh
Harald Hoyer bb31e7
@@ -96,7 +96,7 @@ find_binary() {
Harald Hoyer bb31e7
 
Harald Hoyer bb31e7
 if ! [[ $dracutbasedir ]]; then
Harald Hoyer bb31e7
     dracutbasedir=${BASH_SOURCE[0]%/*}
Harald Hoyer bb31e7
-    [[ $dracutbasedir = "dracut-functions" ]] && dracutbasedir="."
Harald Hoyer bb31e7
+    [[ $dracutbasedir = dracut-functions* ]] && dracutbasedir="."
Harald Hoyer bb31e7
     [[ $dracutbasedir ]] || dracutbasedir="."
Harald Hoyer bb31e7
     dracutbasedir="$(readlink -f $dracutbasedir)"
Harald Hoyer bb31e7
 fi