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