From: Michael Prokop Date: Thu, 11 Dec 2014 10:40:24 +0000 (+0100) Subject: Adjust filesystem check for new blkid behaviour X-Git-Tag: v0.68~1 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=8a4a3c89471607c4603550ecba326b2799cf137e 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 --- 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 \