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

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