summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-07-27 12:40:55 +0200
committerHarald Hoyer <harald@redhat.com>2012-07-27 12:40:55 +0200
commita7473ef379b03c79f40965fb4e332690bd346604 (patch)
tree4b266802412f4f43b094dad7669a766617dde603
parentf7f37923900507c5149ef86f4d459089d7d5f5e0 (diff)
downloaddracut-a7473ef379b03c79f40965fb4e332690bd346604.tar.gz
dracut-a7473ef379b03c79f40965fb4e332690bd346604.tar.bz2
dracut-a7473ef379b03c79f40965fb4e332690bd346604.zip
cifs/parse-cifsroot.sh: fixed more root/netroot parsing
-rwxr-xr-xmodules.d/95cifs/parse-cifsroot.sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/modules.d/95cifs/parse-cifsroot.sh b/modules.d/95cifs/parse-cifsroot.sh
index de7637f8..f376b166 100755
--- a/modules.d/95cifs/parse-cifsroot.sh
+++ b/modules.d/95cifs/parse-cifsroot.sh
@@ -21,22 +21,22 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
[ -z "$root" ] && root=$(getarg root=)
[ -z "$netroot" ] && netroot=$(getarg netroot=)
-# netroot= cmdline argument must be ignored, but must be used if
-# we're inside netroot to parse dhcp root-path
-if [ -n "$netroot" ] ; then
- if [ "$netroot" = "$(getarg netroot=)" ] ; then
- warn "Ignoring netroot argument for CIFS"
- netroot=$root
+# Root takes precedence over netroot
+if [ "${root%%:*}" = "cifs" ] ; then
+
+ # Don't continue if root is ok
+ [ -n "$rootok" ] && return
+
+ if [ -n "$netroot" ] ; then
+ warn "root takes precedence over netroot. Ignoring netroot"
+
fi
-else
- netroot=$root;
+ netroot=$root
+ unset root
fi
-# Continue if cifs
-case "${netroot%%:*}" in
- cifs);;
- *) return;;
-esac
+# If it's not cifs we don't continue
+[ "${netroot%%:*}" = "cifs" ] || return
# Check required arguments
cifs_to_var $netroot