Blame SOURCES/0517-dracut.sh-source-dracut-version.sh-earlier-than-drac.patch

5c6c2a
From 75bf5df4209bec34799fb412d4c5bdd2b03e244d Mon Sep 17 00:00:00 2001
5c6c2a
From: Harald Hoyer <harald@redhat.com>
5c6c2a
Date: Wed, 20 Aug 2014 10:21:43 +0200
5c6c2a
Subject: [PATCH] dracut.sh: source dracut-version.sh earlier than
5c6c2a
 dracut-functions.sh
5c6c2a
5c6c2a
Otherwise dracut-logger.sh outputs an empty version on journal testing.
5c6c2a
5c6c2a
Aug 20 10:15:49 lenovo dracut[11144]: dracut-
5c6c2a
Aug 20 10:15:49 lenovo dracut[11148]: Executing: /sbin/dracut
5c6c2a
5c6c2a
Cherry-picked from: e27ecc9ae8352c98c206ea5165ab6b85d3d6cd3a
5c6c2a
Resolves: #1490777
5c6c2a
---
5c6c2a
 dracut.sh | 8 ++++----
5c6c2a
 1 file changed, 4 insertions(+), 4 deletions(-)
5c6c2a
5c6c2a
diff --git a/dracut.sh b/dracut.sh
5c6c2a
index 1dd3eabd..b34edea2 100755
5c6c2a
--- a/dracut.sh
5c6c2a
+++ b/dracut.sh
5c6c2a
@@ -864,6 +864,10 @@ if [[ $print_cmdline ]]; then
5c6c2a
     kmsgloglvl=0
5c6c2a
 fi
5c6c2a
 
5c6c2a
+if [[ -f $dracutbasedir/dracut-version.sh ]]; then
5c6c2a
+    . $dracutbasedir/dracut-version.sh
5c6c2a
+fi
5c6c2a
+
5c6c2a
 if [[ -f $dracutbasedir/dracut-init.sh ]]; then
5c6c2a
     . $dracutbasedir/dracut-init.sh
5c6c2a
 else
5c6c2a
@@ -882,10 +886,6 @@ if ! [[ $print_cmdline ]]; then
5c6c2a
     rm -fr -- ${initdir}/*
5c6c2a
 fi
5c6c2a
 
5c6c2a
-if [[ -f $dracutbasedir/dracut-version.sh ]]; then
5c6c2a
-    . $dracutbasedir/dracut-version.sh
5c6c2a
-fi
5c6c2a
-
5c6c2a
 # Verify bash version, current minimum is 3.1
5c6c2a
 if (( BASH_VERSINFO[0] < 4 )); then
5c6c2a
     dfatal 'You need at least Bash 4 to use dracut, sorry.'