Revision 1de1eff5 snf-image-helper/tasks/20FilesystemResizeUnmounted.in
b/snf-image-helper/tasks/20FilesystemResizeUnmounted.in | ||
---|---|---|
37 | 37 |
fi |
38 | 38 |
|
39 | 39 |
if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = openbsd ]; then |
40 |
part="${SNF_IMAGE_DEV}$(@scriptsdir@/disklabel.py --print-last-linux "$SNF_IMAGE_DEV")" |
|
40 |
bsd_part="$(@scriptsdir@/disklabel.py --get-last-partition "$SNF_IMAGE_DEV")" |
|
41 |
if [ "$bsd_part" = "b" ]; then |
|
42 |
warn "Last partition is swap space. Resizing ommited" |
|
43 |
exit 0 |
|
44 |
fi |
|
45 |
|
|
46 |
part="${SNF_IMAGE_DEV}$(disklabel2linux "$bsd_part")" |
|
41 | 47 |
|
42 |
# If this fails the script will stop
|
|
43 |
$DUMPFS_OPENBSD "$part" > /dev/null
|
|
48 |
$DUMPFS_OPENBSD "$part" > /dev/null ||
|
|
49 |
{ warn "Filesystem is not UFS. Resizing ommited"; exit 0; }
|
|
44 | 50 |
|
45 |
$GROWFS_OPENBSD -y "$part" |
|
46 |
exit 0 |
|
51 |
$GROWFS_OPENBSD -y "$part"
|
|
52 |
exit 0
|
|
47 | 53 |
fi |
48 | 54 |
|
49 | 55 |
if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = netbsd ]; then |
Also available in: Unified diff