|
|
712866 |
From 900550c4e0c2a48a5d0c01db0adb23e73a6aa195 Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
712866 |
Date: Mon, 24 Nov 2014 15:17:45 +0100
|
|
|
712866 |
Subject: [PATCH] dracut-functions.sh: check if dinfo is a function
|
|
|
712866 |
|
|
|
712866 |
If "dinfo" is an executable, dracut-logger.sh would never be sourced.
|
|
|
712866 |
|
|
|
712866 |
See: https://bugzilla.redhat.com/show_bug.cgi?id=1167082
|
|
|
712866 |
(cherry picked from commit 26d14fb3d36d6091f64258a62c49939478405693)
|
|
|
712866 |
---
|
|
|
712866 |
dracut-functions.sh | 14 +++++++-------
|
|
|
712866 |
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
712866 |
|
|
|
712866 |
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
|
|
5c6c2a |
index 31586ca4..973e2312 100755
|
|
|
712866 |
--- a/dracut-functions.sh
|
|
|
712866 |
+++ b/dracut-functions.sh
|
|
|
712866 |
@@ -169,7 +169,13 @@ srcmods="/lib/modules/$kernel/"
|
|
|
712866 |
}
|
|
|
712866 |
export srcmods
|
|
|
712866 |
|
|
|
712866 |
-if ! type dinfo >/dev/null 2>&1; then
|
|
|
712866 |
+# is_func <command>
|
|
|
712866 |
+# Check whether $1 is a function.
|
|
|
712866 |
+is_func() {
|
|
|
712866 |
+ [[ "$(type -t "$1")" = "function" ]]
|
|
|
712866 |
+}
|
|
|
712866 |
+
|
|
|
712866 |
+if ! is_func dinfo >/dev/null 2>&1; then
|
|
|
712866 |
. "$dracutbasedir/dracut-logger.sh"
|
|
|
712866 |
dlog_init
|
|
|
712866 |
fi
|
|
|
712866 |
@@ -202,12 +208,6 @@ mksubdirs() {
|
|
|
712866 |
[[ -e ${1%/*} ]] || mkdir -m 0755 -p -- "${1%/*}"
|
|
|
712866 |
}
|
|
|
712866 |
|
|
|
712866 |
-# is_func <command>
|
|
|
712866 |
-# Check whether $1 is a function.
|
|
|
712866 |
-is_func() {
|
|
|
712866 |
- [[ "$(type -t "$1")" = "function" ]]
|
|
|
712866 |
-}
|
|
|
712866 |
-
|
|
|
712866 |
# Function prints global variables in format name=value line by line.
|
|
|
712866 |
# $@ = list of global variables' name
|
|
|
712866 |
print_vars() {
|