X-Git-Url: https://code.grnet.gr/git/snf-image/blobdiff_plain/e2510438214acc221f8a2433fd8022b5893a006b..876aef198b58c5904738d3fcd9cf31f244e87f37:/snf-image-helper/tasks/30MountImage.in diff --git a/snf-image-helper/tasks/30MountImage.in b/snf-image-helper/tasks/30MountImage.in index c8d088a..a62c136 100644 --- a/snf-image-helper/tasks/30MountImage.in +++ b/snf-image-helper/tasks/30MountImage.in @@ -45,7 +45,14 @@ if [ ! -b "$rootdev" ]; then "(=$SNF_IMAGE_PROPERTY_ROOT_PARTITION) is valid." fi -mount "$rootdev" "$SNF_IMAGE_TARGET" -o rw +if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = "freebsd" ]; then + if ! $DUMPFS_UFS "$rootdev" &> /dev/null; then + log_error "For FreeBSD images only UFS root partitions are supported." + fi + $MOUNT -t ufs -o ufstype=ufs2,rw "$rootdev" "$SNF_IMAGE_TARGET" +else + $MOUNT -o rw "$rootdev" "$SNF_IMAGE_TARGET" +fi if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" != "linux" ]; then exit 0 @@ -73,7 +80,7 @@ while read line; do # I'm in doupt. Sould I mount the filesystems with the mount options # found in the image's /etc/fstab or not? - mount "${entry[1]}" "${SNF_IMAGE_TARGET}${entry[0]}" # -o "${entry[2]}" + $MOUNT "${entry[1]}" "${SNF_IMAGE_TARGET}${entry[0]}" # -o "${entry[2]}" done <<< "$fstab"