Commit 464c65b2 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Support NetBSD in FixPartitionTable task

parent 530f5f0b
...@@ -35,7 +35,7 @@ if [ ! -b "$SNF_IMAGE_DEV" ]; then ...@@ -35,7 +35,7 @@ if [ ! -b "$SNF_IMAGE_DEV" ]; then
log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device" log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device"
fi fi
if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = openbsd ]; then if [[ "$SNF_IMAGE_PROPERTY_OSFAMILY" =~ ^(open|net)bsd$ ]]; then
@scriptsdir@/disklabel.py -d "$($BLOCKDEV --getsz "$SNF_IMAGE_DEV")" -p "$SNF_IMAGE_DEV" @scriptsdir@/disklabel.py -d "$($BLOCKDEV --getsz "$SNF_IMAGE_DEV")" -p "$SNF_IMAGE_DEV"
# Tell the kernel to recreate the disk partitions. # Tell the kernel to recreate the disk partitions.
# We cannot use partprobe to do this because partprobe uses BLKPG ioctl # We cannot use partprobe to do this because partprobe uses BLKPG ioctl
...@@ -47,11 +47,6 @@ if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = openbsd ]; then ...@@ -47,11 +47,6 @@ if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = openbsd ]; then
exit 0 exit 0
fi fi
if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = netbsd ]; then
warn "Partition resizing currently not supported for NetBSD"
exit 0
fi
table=$(get_partition_table "$SNF_IMAGE_DEV") table=$(get_partition_table "$SNF_IMAGE_DEV")
if [ $(get_partition_count "$table") -eq 0 ]; then if [ $(get_partition_count "$table") -eq 0 ]; then
......
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