File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -92,19 +92,21 @@ if [ -n "$nvmf_hostid" ]; then
92
92
echo " $nvmf_hostid " > /etc/nvme/hostid
93
93
fi
94
94
95
+ NVMF_FC_AUTO=
95
96
for d in $( getargs rd.nvmf.discover -d nvmf.discover=) ; do
96
- parse_nvmf_discover " $d " || break
97
+ parse_nvmf_discover " $d " || {
98
+ NVMF_FC_AUTO=1
99
+ break
100
+ }
97
101
done
98
102
99
103
# Host NQN and host id are mandatory for NVMe-oF
100
104
[ -f " /etc/nvme/hostnqn" ] || exit 0
101
105
[ -f " /etc/nvme/hostid" ] || exit 0
102
106
103
- if [ -f " /etc/nvme/discovery.conf" ]; then
104
- /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
107
+ # If no nvme command line arguments present, try autodiscovery
108
+ if [ $NVMF_FC_AUTO ] || [ ! -f " /etc/nvme/discovery.conf" ]; then
109
+ /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
105
110
else
106
- # No nvme command line arguments present, try autodiscovery
107
- if [ " $trtype " = " fc" ]; then
108
- /sbin/initqueue --settled --onetime --unique --name nvme-fc-autoconnect /sbin/nvmf-autoconnect.sh
109
- fi
111
+ /sbin/initqueue --settled --onetime --unique --name nvme-discover /usr/sbin/nvme connect-all
110
112
fi
You can’t perform that action at this time.
0 commit comments