init: drop iscsi support

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl
2025-09-18 18:55:34 +02:00
parent 12050055f8
commit 1dae9406dc

View File

@@ -118,69 +118,6 @@ mount_common() {
error "mount_common" "Could not mount $1" error "mount_common" "Could not mount $1"
} }
get_iscsistart_options() {
# Convert kernel commandline ISCSI= options to iscsistart options
IFS_SAVE="$IFS"
IFS=,
for arg in $1; do
val="${arg#*=}"
case "$arg" in
iscsi_initiator=*)
option="-i"
;;
iscsi_target_name=*)
option="-t"
;;
iscsi_target_ip=*)
option="-a"
;;
iscsi_target_port=*)
option="-p"
;;
iscsi_target_group=*)
option="-g"
;;
iscsi_username=*)
option="-u"
;;
iscsi_password=*)
option="-w"
;;
iscsi_in_username=*)
option="-U"
;;
iscsi_in_password=*)
option="-W"
;;
esac
echo "$option $val"
done
IFS="$IFS_SAVE"
}
mount_iscsi() {
# Mount iSCSI target
ISCSI_DEV="${1##*,}"
ISCSI_OPTIONS="${1%,*}"
if [ ! -f "/usr/sbin/iscsistart" ]; then
error "iscsistart" "iSCSI support not available"
fi
if [ "$ISCSI_OPTIONS" = "auto" ]; then
progress "Network configuration based on iBFT"
/usr/sbin/iscsistart -N >&$SILENT_OUT 2>&1 || error "iscsistart" "Unable to configure network"
progress "iSCSI auto connect based on iBFT"
/usr/sbin/iscsistart -b >&$SILENT_OUT 2>&1 || error "iscsistart" "Unable to auto connect"
else
/usr/sbin/iscsistart $(get_iscsistart_options "$ISCSI_OPTIONS") >&$SILENT_OUT 2>&1 || error "iscsistart" "Unable to connect to ISCSI target"
fi
mount_common "$ISCSI_DEV" "$2" "$3" "$4"
}
mount_nbd() { mount_nbd() {
# Mount NBD device # Mount NBD device
NBD_SERVER="${1%%:*}" NBD_SERVER="${1%%:*}"
@@ -224,9 +161,6 @@ mount_part() {
MOUNT_CMD="mount_common" MOUNT_CMD="mount_common"
MOUNT_TARGET="$1" MOUNT_TARGET="$1"
;; ;;
ISCSI=*)
MOUNT_CMD="mount_iscsi"
;;
NBD=*) NBD=*)
MOUNT_CMD="mount_nbd" MOUNT_CMD="mount_nbd"
;; ;;
@@ -972,7 +906,7 @@ for arg in $(cat /proc/cmdline); do
boot=*) boot=*)
boot="${arg#*=}" boot="${arg#*=}"
case $boot in case $boot in
ISCSI=*|NBD=*|NFS=*) NBD=*|NFS=*)
UPDATE_DISABLED=yes UPDATE_DISABLED=yes
FLASH_NETBOOT=yes FLASH_NETBOOT=yes
;; ;;
@@ -984,7 +918,7 @@ for arg in $(cat /proc/cmdline); do
disk=*) disk=*)
disk="${arg#*=}" disk="${arg#*=}"
case $disk in case $disk in
ISCSI=*|NBD=*|NFS=*) NBD=*|NFS=*)
STORAGE_NETBOOT=yes STORAGE_NETBOOT=yes
;; ;;
/dev/*|LABEL=*|UUID=*) /dev/*|LABEL=*|UUID=*)