From 8a4a3c89471607c4603550ecba326b2799cf137e Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 11 Dec 2014 11:40:24 +0100 Subject: [PATCH] Adjust filesystem check for new blkid behaviour blkid used to return with an exit code of 2 if 'blkid -s TYPE -o value' was executed on an unformated device. Nowadays blkid returns with exit code 0 even if there's no file system on the according device. Related to #772846 in Debian. Closes: #772849 --- grml-debootstrap | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grml-debootstrap b/grml-debootstrap index c029246..ffcb6aa 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -430,7 +430,10 @@ prompt_for_target() fi PARTITION_LIST=$(for i in $AVAILABLE_PARTITIONS ; do - echo "$i $(blkid -s TYPE -o value "$i" 2>/dev/null || echo '[no_filesystem_yet]')" + fs="$(blkid -s TYPE -o value "$i" 2>/dev/null)" + [ -n "$fs" ] || fs='[no_filesystem_yet]' + echo "$i" "$fs" + unset fs done) TARGET=$(dialog --title "$PN" --single-quoted --stdout \ -- 2.1.4