Commit 27acc2e4 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix ROOT_PARTITION property support

parent 09ac08db
......@@ -74,7 +74,6 @@ target=$(mktemp -d --tmpdir target.XXXXXX)
add_cleanup rmdir "$target"
export SNF_IMAGE_TARGET="$target"
export SNF_IMAGE_ROOTDEV="${SNF_IMAGE_DEV}${SNF_IMAGE_ROOT}"
if [ ! -d "@tasksdir@" ]; then
log_error "snf-image/tasks directory is missing"
......
......@@ -13,11 +13,17 @@ if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir:\`$SNF_IMAGE_TARGET' is missing"
fi
if [ ! -b "$SNF_IMAGE_ROOTDEV" ]; then
log_error "Device file:\`$SNF_IMAGE_ROOTDEV' is not a block device"
if [ -z "$SNF_IMAGE_PROPERTY_ROOT_PARTITION" ]; then
log_error "Root Partition image property not defined"
fi
mount "$SNF_IMAGE_ROOTDEV" "$SNF_IMAGE_TARGET" -o rw
rootdev="${SNF_IMAGE_DEV}${SNF_IMAGE_PROPERTY_ROOT_PARTITION}"
if [ ! -b "$rootdev" ]; then
log_error "Image root partition device:\`$rootdev' is not a block device"
fi
mount "$rootdev" "$SNF_IMAGE_TARGET" -o rw
exit 0
......
......@@ -74,7 +74,7 @@ case "$IMAGE_TYPE" in
target="$(map_disk0 "$blockdev")-1" #the root device
add_cleanup unmap_disk0 "$blockdev"
snf_export_ROOT=1
snf_export_PROPERTY_ROOT_PARTITION=1
;;
diskdump|custom)
target="$blockdev"
......
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