[PATCH 2/2] Make sure we work with fresh data when trying to do netroot

Vratislav Podzimek vpodzime at redhat.com
Fri Jul 3 12:30:49 UTC 2015


If $repo is not set when we are asked to do netroot we need to make sure we are
working with fresh data because things may have gotten processed/setup at some
place that could have no way to deliver the new information via the environemnt
variable.

Related: rhbz#1082500
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 dracut/anaconda-netroot.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dracut/anaconda-netroot.sh b/dracut/anaconda-netroot.sh
index f080b1f..2fbb6ff 100755
--- a/dracut/anaconda-netroot.sh
+++ b/dracut/anaconda-netroot.sh
@@ -10,6 +10,12 @@ netif="$1"
 # get repo info
 splitsep ":" "$root" prefix repo
 
+# repo not set? make sure we are using fresh repo information
+if [ -z "$repo" ]; then
+     . $hookdir/cmdline/*parse-anaconda-repo.sh
+     splitsep ":" "$root" prefix repo
+fi
+
 # no repo? non-net root? we're not needed here.
 [ "$prefix" = "anaconda-net" ] && [ -n "$repo" ] || return 0
 # already done? don't run again.
-- 
2.1.0



More information about the anaconda-patches mailing list