|
|
|
@ -630,12 +630,49 @@ startVolumes() {
|
|
|
|
|
|
|
|
|
|
startiscsi() {
|
|
|
|
|
|
|
|
|
|
if [ -n "${ISCSI_I}" ] && [ -n "${ISCSI_T}" ] && [ -n "${ISCSI_A}" ]
|
|
|
|
|
if [ -n "${ISCSI_INITIATORNAME}" ] && [ -n "${ISCSI_TARGET}" ] && [ -n "${ISCSI_ADDRESS}" ]
|
|
|
|
|
then
|
|
|
|
|
good_msg "Activating ISCSI"
|
|
|
|
|
iscsistart -i "${ISCSI_I}" -t "${ISCSI_T}" -g 1 -a ${ISCSI_A}
|
|
|
|
|
good_msg "Activating iSCSI"
|
|
|
|
|
|
|
|
|
|
if [ "${ISCSI_TGPT}" ]
|
|
|
|
|
then
|
|
|
|
|
ADDITIONAL="${ADDITIONAL} -g ${ISCSI_TGPT}"
|
|
|
|
|
else
|
|
|
|
|
ADDITIONAL="${ADDITIONAL} -g 1"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${ISCSI_PORT}" ]
|
|
|
|
|
then
|
|
|
|
|
ADDITIONAL="${ADDITIONAL} -p ${ISCSI_PORT}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${ISCSI_USERNAME}" ]
|
|
|
|
|
then
|
|
|
|
|
ADDITIONAL="${ADDITIONAL} -u ${ISCSI_USERNAME}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${ISCSI_PASSWORD}" ]
|
|
|
|
|
then
|
|
|
|
|
ADDITIONAL="${ADDITIONAL} -w ${ISCSI_PASSWORD}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${ISCSI_USERNAME_IN}" ]
|
|
|
|
|
then
|
|
|
|
|
ADDITIONAL="${ADDITIONAL} -U ${ISCSI_USERNAME_IN}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${ISCSI_PASSWORD_IN}" ]
|
|
|
|
|
then
|
|
|
|
|
ADDITIONAL="${ADDITIONAL} -W ${ISCSI_PASSWORD_IN}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "${ISCSI_DEBUG}" ]
|
|
|
|
|
then
|
|
|
|
|
ADDITIONAL="${ADDITIONAL} -d ${ISCSI_DEBUG}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
iscsistart -i "${ISCSI_INITIATORNAME}" -t "${ISCSI_TARGET}" -a "${ISCSI_ADDRESS}" ${ADDITIONAL}
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|