From 929b3fb64c8bfd2600c843f5e954290fafb6e09d Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 10 Jan 2023 08:18:10 +0100 Subject: [PATCH] show raid5/6 warning only if selected --- usr/lib/archboot/installer/btrfs.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/lib/archboot/installer/btrfs.sh b/usr/lib/archboot/installer/btrfs.sh index 1fa93486d..3d51272d8 100644 --- a/usr/lib/archboot/installer/btrfs.sh +++ b/usr/lib/archboot/installer/btrfs.sh @@ -112,7 +112,6 @@ _btrfs_raid_level() { _BTRFS_LEVEL="" _BTRFS_DEVICE="${_PART}" : >/tmp/.btrfs-devices - _dialog --msgbox "BTRFS DATA RAID OPTIONS:\n\nRAID5/6 are for testing purpose. Use with extreme care!\n\nIf you don't need this feature select NONE." 0 0 while [[ "${_BTRFS_RAID_FINISH}" != "DONE" ]]; do #shellcheck disable=SC2086 _dialog --menu "Select the raid data level you want to use:" 14 50 10 ${_BTRFS_RAIDLEVELS} 2>"${_ANSWER}" || return 1 @@ -121,6 +120,9 @@ _btrfs_raid_level() { echo "${_BTRFS_DEVICE}" >>/tmp/.btrfs-devices break else + if [[ "${_BTRFS_LEVEL}" == "raid5" || "${_BTRFS_LEVEL}" == "raid6" ]]; then + _dialog --msgbox "BTRFS DATA RAID OPTIONS:\n\nRAID5/6 are for testing purpose. Use with extreme care!" 0 0 + fi # take selected device as 1st device, add additional devices in part below. _select_btrfs_raid_devices fi