Commit de34e7aa authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Add support for enlarging OpenBSD images

This only enlarges the partition and not the ufs file system
parent 326e2667
......@@ -7,7 +7,7 @@ SUBDIRS = tasks
dist_doc_DATA = COPYING AUTHORS
dist_bin_SCRIPTS = snf-image-helper
dist_scripts_SCRIPTS= hashpwd.py inject-files.py decode-properties.py
dist_scripts_SCRIPTS= hashpwd.py inject-files.py decode-properties.py disklabel.py
dist_common_DATA = common.sh unattend.xml
edit = sed \
......
This diff is collapsed.
......@@ -35,9 +35,13 @@ if [ ! -b "$SNF_IMAGE_DEV" ]; then
log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device"
fi
if [[ "$SNF_IMAGE_PROPERTY_OSFAMILY" =~ (net)|(open)bsd ]]; then
os=${SNF_IMAGE_PROPERTY_OSFAMILY^^[bsd]}
warn "Partition resizing currently not supported for ${os^?}"
if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = openbsd ]; then
@scriptsdir@/disklabel.py -d "$(blockdev --getsz "$SNF_IMAGE_DEV")" -p "$SNF_IMAGE_DEV"
exit 0
fi
if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = netbsd ]; then
warn "Partition resizing currently not supported for NetBSD"
exit 0
fi
......
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