Commit 2dcbe945 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Check in MountImage task if /etc/fstab is present

Add an extra check to determine if the user gave the correct
ROOT_PARTITION property
parent 971a3e68
......@@ -40,8 +40,8 @@ fi
rootdev="${SNF_IMAGE_DEV}${SNF_IMAGE_PROPERTY_ROOT_PARTITION}"
if [ ! -b "$rootdev" ]; then
log_error "Root partition device:\`$rootdev' is not a block device. " \
"Please check if the value for image property \`ROOT_PARTITION' " \
log_error "Root partition device:\`$rootdev' is not a block device." \
"Please check if the value for image property \`ROOT_PARTITION'" \
"(=$SNF_IMAGE_PROPERTY_ROOT_PARTITION) is valid."
fi
......@@ -68,6 +68,12 @@ if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = "windows" ]; then
exit 0
fi
if [ ! -f "$SNF_IMAGE_TARGET/etc/fstab" ]; then
log_error "\`/etc/fstab' is missing from the root partition." \
"Please check if the value for image property \`ROOT_PARTITION'" \
"(=$SNF_IMAGE_PROPERTY_ROOT_PARTITION) is valid."
fi
mount_all "$SNF_IMAGE_PROPERTY_OSFAMILY" "$SNF_IMAGE_DEV" "$SNF_IMAGE_TARGET"
exit 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment