]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - modules.d/95nbd/parse-nbdroot.sh
Renamed all shell scripts to *.sh
[thirdparty/dracut.git] / modules.d / 95nbd / parse-nbdroot.sh
index e2376689ec7add1174d128bbd2c4cd78d74321be..ec9e1f664ac7928df40cfe4dc6caaba41443a7d5 100755 (executable)
@@ -24,15 +24,16 @@ netroot_to_var() {
     server=$2; port=$3;
 }
 
-# Don't continue if root is ok
-[ -n "$rootok" ] && return
-
 # This script is sourced, so root should be set. But let's be paranoid
 [ -z "$root" ] && root=$(getarg root=)
 [ -z "$netroot" ] && netroot=$(getarg netroot=)
 
 # Root takes precedence over netroot
 if [ "${root%%:*}" = "nbd" ] ; then
+
+    # Don't continue if root is ok
+    [ -n "$rootok" ] && return
+
     if [ -n "$netroot" ] ; then
         warn "root takes precedence over netroot. Ignoring netroot"