Browse Source

iscsi: call "iscsistart -b" until it succeeds

master
Harald Hoyer 11 years ago
parent
commit
21a3aab720
  1. 11
      modules.d/95iscsi/iscsiroot.sh
  2. 2
      modules.d/95iscsi/parse-iscsiroot.sh

11
modules.d/95iscsi/iscsiroot.sh

@ -45,11 +45,20 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then @@ -45,11 +45,20 @@ if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
done

if ! [ -e /tmp/iscsistarted-firmware ]; then
iscsistart -b $iscsi_param
if ! iscsistart -f | vinfo; then
warn "iscistart: Could not get list of targets from firmware."
exit 1
fi

if ! iscsistart -b $iscsi_param 2>&1 | vinfo; then
warn "\`iscsistart -b $iscsi_param\´ failed"
exit 1
fi
echo 'started' > "/tmp/iscsistarted-iscsi"
echo 'started' > "/tmp/iscsistarted-firmware"
need_shutdown
fi

[ "$netif" = dummy ] && exit 0
fi


2
modules.d/95iscsi/parse-iscsiroot.sh

@ -64,7 +64,7 @@ if [ -n "$iscsi_firmware" ] ; then @@ -64,7 +64,7 @@ if [ -n "$iscsi_firmware" ] ; then
netroot=${netroot:-iscsi}
modprobe -q iscsi_boot_sysfs 2>/dev/null
modprobe -q iscsi_ibft
initqueue --onetime --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
initqueue --settled /sbin/iscsiroot dummy "$netroot" "$NEWROOT"
fi

# If it's not iscsi we don't continue

Loading…
Cancel
Save