]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
override commandline/conf options by root_path
authorHarald Hoyer <harald@redhat.com>
Tue, 2 Jun 2009 14:10:04 +0000 (16:10 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 2 Jun 2009 14:10:04 +0000 (16:10 +0200)
modules.d/95iscsi/iscsiroot

index 4583a089a1463b27160615d92fd59c2f88ad2a5e..dd7416fe550f5e9f2335543e33b5178da6b249cf 100755 (executable)
@@ -33,17 +33,6 @@ if getarg iscsi_firmware >/dev/null; then
        modprobe crc32c
        iscsistart -b
 else
-       OLDIFS="$IFS"
-       IFS=:
-       set $root
-
-       iscsi_target_ip=$1; shift
-       iscsi_protocol=$1; shift # ignored
-       iscsi_target_port=$1; shift
-       iscsi_lun=$1; shift
-       iscsi_target_name=$*
-       IFS="$OLDIFS"
-
        # override conf settings by command line options
        arg=$(getarg iscsi_initiator)
        [ -n "$arg" ] && iscsi_initiator=$arg
@@ -64,6 +53,18 @@ else
        arg=$(getarg iscsi_in_password)
        [ -n "$arg" ] && iscsi_in_password=$arg
 
+
+       # override conf/commandline options by dhcp root_path
+       OLDIFS="$IFS"
+       IFS=:
+       set $root
+       iscsi_target_ip=$1; shift
+       iscsi_protocol=$1; shift # ignored
+       iscsi_target_port=$1; shift
+       iscsi_lun=$1; shift
+       iscsi_target_name=$*
+       IFS="$OLDIFS"
+
        getarg ro && iscsirw=ro
        getarg rw && iscsirw=rw
        fsopts=${fsopts+$fsopts,}${iscsirw}