From 014ac219ac0ad9ef4a4bce4d01d5205aefe4ffa5 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 16 Nov 2024 13:25:02 +0100 Subject: [PATCH] list_block_devices --- shell/util.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shell/util.sh b/shell/util.sh index 7d333ae..4dcd59a 100644 --- a/shell/util.sh +++ b/shell/util.sh @@ -1,3 +1,9 @@ +list_block_devices() { + lsblk \ + --noempty \ + --output "NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINTS" +} + not() { case "${1}" in "false") echo "true" ;; @@ -24,7 +30,7 @@ read_secret() { warn_wipe() { local tmp - lsblk --noempty + list_block_devices printf "%s" "WIPE ${*} /?\\ OR CANCEL /!\\" read -r tmp log_trace "${tmp}"