The key is supposed to be derived from the hostnqn not fom the subsys
name.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
hostid="${def_hostid}"
hostnqn="${def_hostnqn}"
- hostkey="$(nvme gen-dhchap-key -n ${subsys_name} 2> /dev/null)"
+ hostkey="$(nvme gen-dhchap-key -n ${hostnqn} 2> /dev/null)"
if [ -z "$hostkey" ] ; then
echo "nvme gen-dhchap-key failed"
return 1