Revision 27acc2e4
b/snf-image-helper/snf-image-helper.in | ||
---|---|---|
74 | 74 |
add_cleanup rmdir "$target" |
75 | 75 |
|
76 | 76 |
export SNF_IMAGE_TARGET="$target" |
77 |
export SNF_IMAGE_ROOTDEV="${SNF_IMAGE_DEV}${SNF_IMAGE_ROOT}" |
|
78 | 77 |
|
79 | 78 |
if [ ! -d "@tasksdir@" ]; then |
80 | 79 |
log_error "snf-image/tasks directory is missing" |
b/snf-image-helper/tasks/30MountImage.in | ||
---|---|---|
13 | 13 |
log_error "Target dir:\`$SNF_IMAGE_TARGET' is missing" |
14 | 14 |
fi |
15 | 15 |
|
16 |
if [ ! -b "$SNF_IMAGE_ROOTDEV" ]; then
|
|
17 |
log_error "Device file:\`$SNF_IMAGE_ROOTDEV' is not a block device"
|
|
16 |
if [ -z "$SNF_IMAGE_PROPERTY_ROOT_PARTITION" ]; then
|
|
17 |
log_error "Root Partition image property not defined"
|
|
18 | 18 |
fi |
19 | 19 |
|
20 |
mount "$SNF_IMAGE_ROOTDEV" "$SNF_IMAGE_TARGET" -o rw |
|
20 |
rootdev="${SNF_IMAGE_DEV}${SNF_IMAGE_PROPERTY_ROOT_PARTITION}" |
|
21 |
|
|
22 |
if [ ! -b "$rootdev" ]; then |
|
23 |
log_error "Image root partition device:\`$rootdev' is not a block device" |
|
24 |
fi |
|
25 |
|
|
26 |
mount "$rootdev" "$SNF_IMAGE_TARGET" -o rw |
|
21 | 27 |
|
22 | 28 |
exit 0 |
23 | 29 |
|
b/snf-image-host/create | ||
---|---|---|
74 | 74 |
|
75 | 75 |
target="$(map_disk0 "$blockdev")-1" #the root device |
76 | 76 |
add_cleanup unmap_disk0 "$blockdev" |
77 |
snf_export_ROOT=1
|
|
77 |
snf_export_PROPERTY_ROOT_PARTITION=1
|
|
78 | 78 |
;; |
79 | 79 |
diskdump|custom) |
80 | 80 |
target="$blockdev" |
Also available in: Unified diff