[PATCH] dracut: remove workarounds for broken splitsep()
Will Woods
wwoods at redhat.com
Tue Aug 21 19:26:38 UTC 2012
the splitsep function was buggy before, but it was fixed in dracut 019
so we don't need these workarounds anymore.
See upstream dracut commit f7cadaa843498c4b986f8a030fab39002ad108b6.
Related: 844c0c156ed2f27920257d86690f3017727f398e
Related: 700e985082b03abcbd3009de81885b8fbf72818b
---
dracut/anaconda-netroot.sh | 3 +--
dracut/parse-anaconda-repo.sh | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dracut/anaconda-netroot.sh b/dracut/anaconda-netroot.sh
index 3ab873a..0425661 100755
--- a/dracut/anaconda-netroot.sh
+++ b/dracut/anaconda-netroot.sh
@@ -8,8 +8,7 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh
netif="$1"
# get repo info
-# splitsep ":" "$root" prefix repo # FIXME: doesn't work as documented!
-prefix=${root%%:*}; repo=${root#*:}
+splitsep ":" "$root" prefix repo
# no repo? non-net root? we're not needed here.
[ "$prefix" = "anaconda-net" ] && [ -n "$repo" ] || return 0
diff --git a/dracut/parse-anaconda-repo.sh b/dracut/parse-anaconda-repo.sh
index 59bf7b5..96de458 100755
--- a/dracut/parse-anaconda-repo.sh
+++ b/dracut/parse-anaconda-repo.sh
@@ -12,9 +12,7 @@ arg="repo"
[ -n "$stage2" ] && arg="stage2" && repo="$stage2"
if [ -n "$repo" ]; then
- #splitsep ":" "$repo" repotype rest # FIXME: splitsep is buggy
- repotype=${repo%%:*}
- rest=${repo#$repotype:}; [ "$rest" = "$repo" ] && rest=""
+ splitsep ":" "$repo" repotype rest
case "$repotype" in
http|https|ftp|nfs|nfs4|nfsiso)
set_neednet; root="anaconda-net:$repo" ;;
--
1.7.11.4
More information about the anaconda-patches
mailing list