partmap_test: check that parted is available

Skip test if parted is unavailable instead of returning false failure.
This commit is contained in:
Andrei Borzenkov 2015-11-07 23:42:35 +03:00
parent c7f93a20c4
commit c054020581
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,12 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
disk=hd0
;;
esac
if ! which parted >/dev/null 2>&1; then
echo "parted not installed; cannot test partmap"
exit 77
fi
imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1