TT#7473 Ask user confirmation to use 'unsupported' disk

It is impossible to install puppet node on plain SSD drive:
> Error: /dev/sdc does not look like a VirtIO, ServeRAID, LSILOGIC or PowerEdge disk/controller. Exiting to avoid possible data damage.

Lets ask the user confirmation here, as restart installation
is very slow way in case of manual bonding configuration and
slow IBM hardware POST.

The boot option TARGET_DISK can be used to bypass any checks here.

Change-Id: I6ace2c0225b7e66896a00459594901d06ae7bf0c
changes/92/10892/1
Alexander Lutay 8 years ago
parent d960d6bf33
commit ba7c8ff52b

@ -1049,6 +1049,27 @@ check_for_supported_disk() {
return 0
fi
local disk_model
disk_model=$(cat "/sys/block/${DISK}/device/model") || true
local disk_vendor
disk_vendor=$(cat "/sys/block/${DISK}/device/vendor") || true
echo "WARNING: Cannot detect supported device vendor/model." >&2
echo "(Disk: ${DISK} Vendor: ${disk_vendor} Model: ${disk_model})" >&2
echo "Would you like to continue anyway? (yes/NO)" >&2
read a
case "$a" in
y|Y|yes|YES)
echo "Continue anyway as requested."
return 0
;;
*)
echo "Aborting installation using disk '${DISK}'" >&2
return 1
;;
esac
unset a
# no match so far?
return 1
}

Loading…
Cancel
Save