summaryrefslogtreecommitdiff
path: root/modules.d/95iscsi
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2009-06-02 16:10:04 +0200
committerHarald Hoyer <harald@redhat.com>2009-06-02 16:10:04 +0200
commit61537c7de63c9eed91cb8ee34986a2ceaec9eaa2 (patch)
treed4876947c1c9ce9c7982522aeb141a351de960a4 /modules.d/95iscsi
parentaf17f82ed9a2ce9f05a1a830c8c0fc70d0245e2f (diff)
downloaddracut-61537c7de63c9eed91cb8ee34986a2ceaec9eaa2.tar.gz
dracut-61537c7de63c9eed91cb8ee34986a2ceaec9eaa2.tar.bz2
dracut-61537c7de63c9eed91cb8ee34986a2ceaec9eaa2.zip
override commandline/conf options by root_path
Diffstat (limited to 'modules.d/95iscsi')
-rwxr-xr-xmodules.d/95iscsi/iscsiroot23
1 files changed, 12 insertions, 11 deletions
diff --git a/modules.d/95iscsi/iscsiroot b/modules.d/95iscsi/iscsiroot
index 4583a089..dd7416fe 100755
--- a/modules.d/95iscsi/iscsiroot
+++ b/modules.d/95iscsi/iscsiroot
@@ -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}