Enlarge NetBSD partitions in FixPartitionTable feature-enlarge-netbsd
authorNikos Skalkotos <skalkoto@grnet.gr>
Wed, 5 Mar 2014 12:46:49 +0000 (14:46 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Wed, 5 Mar 2014 12:46:49 +0000 (14:46 +0200)
snf-image-helper/tasks/10FixPartitionTable.in

index 55ea769..a0f09ba 100644 (file)
@@ -35,7 +35,7 @@ if [ ! -b "$SNF_IMAGE_DEV" ]; then
     log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device"
 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"
     # Tell the kernel to recreate the disk partitions.
     # We cannot use partprobe to do this because partprobe uses BLKPG ioctl
@@ -47,11 +47,6 @@ if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = openbsd ]; then
     exit 0
 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")
 
 if [ $(get_partition_count "$table") -eq 0 ]; then