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) - Security Tokens (TPM, Smart Cards, etc)
- Software - Software
- Block protocols over Ethernet/IP - Block protocols over Ethernet/IP
- iSCSI
- ATA over Ethernet - ATA over Ethernet
- FCP over Ethernet - FCP over Ethernet
- Infiniband over IP - Infiniband over IP

@ -629,13 +629,50 @@ startVolumes() {
} }
startiscsi() { startiscsi() {
if [ -n "${ISCSI_I}" ] && [ -n "${ISCSI_T}" ] && [ -n "${ISCSI_A}" ] if [ -n "${ISCSI_INITIATORNAME}" ] && [ -n "${ISCSI_TARGET}" ] && [ -n "${ISCSI_ADDRESS}" ]
then then
good_msg "Activating ISCSI" good_msg "Activating iSCSI"
iscsistart -i "${ISCSI_I}" -t "${ISCSI_T}" -g 1 -a ${ISCSI_A}
fi 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\=*)
NFSROOT=`parse_opt "${x}"` NFSROOT=`parse_opt "${x}"`
;; ;;
# ISCSI # iSCSI
iscsi_i\=*) iscsi_initiatorname\=*)
ISCSI_I=`parse_opt "${x}"` ISCSI_INITIATORNAME=`parse_opt "${x}"`
;; ;;
iscsi_t\=*) iscsi_target\=*)
ISCSI_T=`parse_opt "${x}"` ISCSI_TARGET=`parse_opt "${x}"`
;; ;;
iscsi_a\=*) iscsi_tgpt\=*)
ISCSI_A=`parse_opt "${x}"` 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 # Crypto
crypt_root\=*) crypt_root\=*)
@ -268,15 +289,15 @@ sdelay
# Start device manager # Start device manager
start_dev_mgr start_dev_mgr
# Start iSCSI
startiscsi
# Setup md device nodes if they dont exist # Setup md device nodes if they dont exist
setup_md_device setup_md_device
# Scan volumes # Scan volumes
startVolumes startVolumes
# Start ISCSI
startiscsi
setup_keymap setup_keymap
# Initialize LUKS root device except for livecd's # Initialize LUKS root device except for livecd's

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

@ -348,7 +348,7 @@ then
[ "${EVMS}" -eq '1' ] && print_info 1 'add "doevms" for evms support' [ "${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 'add "dodmraid" for dmraid support'
[ "${DMRAID}" -eq '1' ] && print_info 1 ' or "dodmraid=<additional options>"' [ "${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 fi
[ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR} [ "${BOOTRW}" != '' ] && mount -o remount,ro ${BOOTDIR}

Loading…
Cancel
Save