Improve naming of bootflags, added support for: port, target portal, username, password, username_in, password_in, debug

cleanup-cruft
craig 15 years ago
parent 19e377b12a
commit 97b4dc26e2

@ -17,7 +17,6 @@
- Security Tokens (TPM, Smart Cards, etc)
- Software
- Block protocols over Ethernet/IP
- iSCSI
- ATA over Ethernet
- FCP over Ethernet
- Infiniband over IP

@ -629,13 +629,50 @@ 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}
fi
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
}

@ -149,15 +149,36 @@ do
nfsroot\=*)
NFSROOT=`parse_opt "${x}"`
;;
# ISCSI
iscsi_i\=*)
ISCSI_I=`parse_opt "${x}"`
# iSCSI
iscsi_initiatorname\=*)
ISCSI_INITIATORNAME=`parse_opt "${x}"`
;;
iscsi_t\=*)
ISCSI_T=`parse_opt "${x}"`
iscsi_target\=*)
ISCSI_TARGET=`parse_opt "${x}"`
;;
iscsi_a\=*)
ISCSI_A=`parse_opt "${x}"`
iscsi_tgpt\=*)
ISCSI_TGPT=`parse_opt "${x}"`
;;
iscsi_address\=*)
ISCSI_ADDRESS=`parse_opt "${x}"`
;;
iscsi_port\=*)
ISCSI_PORT=`parse_opt "${x}"`
;;
iscsi_username\=*)
ISCSI_USERNAME=`parse_opt "${x}"`
;;
iscsi_password\=*)
ISCSI_PASSWORD=`parse_opt "${x}"`
;;
iscsi_username_in\=*)
ISCSI_USERNAME_IN=`parse_opt "${x}"`
;;
iscsi_password_in\=*)
ISCSI_PASSWORD_IN=`parse_opt "${x}"`
;;
iscsi_debug\=*)
ISCSI_DEBUG=`parse_opt "${x}"`
;;
# Crypto
crypt_root\=*)
@ -268,15 +289,15 @@ sdelay
# Start device manager
start_dev_mgr
# Start iSCSI
startiscsi
# Setup md device nodes if they dont exist
setup_md_device
# Scan volumes
startVolumes
# Start ISCSI
startiscsi
setup_keymap
# Initialize LUKS root device except for livecd's

@ -204,7 +204,7 @@ append_iscsi(){
then
rm -r "${TEMP}/initramfs-iscsi-temp/"
fi
print_info 1 'ISCSI: Adding support (compiling binaries)...'
print_info 1 'iSCSI: Adding support (compiling binaries)...'
compile_iscsi
cd ${TEMP}
mkdir -p "${TEMP}/initramfs-iscsi-temp/bin/"

@ -348,7 +348,7 @@ then
[ "${EVMS}" -eq '1' ] && print_info 1 'add "doevms" for evms support'
[ "${DMRAID}" -eq '1' ] && print_info 1 'add "dodmraid" for dmraid support'
[ "${DMRAID}" -eq '1' ] && print_info 1 ' or "dodmraid=<additional options>"'
[ "${ISCSI}" -eq '1' ] && print_info 1 'add "iscsi_i=<initiator name> iscsi_t=<target name> iscsi_a=<target ip>" for iscsi support'
[ "${ISCSI}" -eq '1' ] && print_info 1 'add at least "iscsi_initiatorname=<initiator name> iscsi_target=<target name> and iscsi_address=<target ip>" for iscsi support'
fi
[ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR}

Loading…
Cancel
Save