Fail helpfully if uuidgen is missing
If uuidgen is not installed we currently fail when performing tune2fs. Change-Id: I4062eb1d62322c455dac5b83b856f454da211320
This commit is contained in:
parent
2dfb931d95
commit
c94880aa2f
@ -158,6 +158,11 @@ fi
|
|||||||
# NOTE: Tuning the rootfs uuid works only for ext filesystems.
|
# NOTE: Tuning the rootfs uuid works only for ext filesystems.
|
||||||
# Rely on the below environment variable only for ext filesystems.
|
# Rely on the below environment variable only for ext filesystems.
|
||||||
export DIB_IMAGE_ROOT_FS_UUID=$(uuidgen -r)
|
export DIB_IMAGE_ROOT_FS_UUID=$(uuidgen -r)
|
||||||
|
if echo "$FS_TYPE" | grep -q "^ext" && [ -z "${DIB_IMAGE_ROOT_FS_UUID}" ]; then
|
||||||
|
echo "ext filesystem detected but no DIB_IMAGE_ROOT_FS_UUID found."
|
||||||
|
echo "Is the uuidgen utility installed on your system?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# FS_TYPE isn't available until after we source img-defaults
|
# FS_TYPE isn't available until after we source img-defaults
|
||||||
if [ -z "$DIB_ROOT_LABEL" ]; then
|
if [ -z "$DIB_ROOT_LABEL" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user