root / snf-image-helper / tasks / 10ResizeUnmounted.in @ aa4fc6bb
History | View | Annotate | Download (531 Bytes)
1 |
#! /bin/bash |
---|---|
2 |
|
3 |
### BEGIN TASK INFO |
4 |
# Provides: ResizeUnmounted |
5 |
# RunBefore: MountImage |
6 |
# Short-Description: Resize filesystem to use all the available space |
7 |
### END TAST INFO |
8 |
|
9 |
set -e |
10 |
. @commondir@/common.sh |
11 |
|
12 |
if [ ! -b "$SNF_IMAGE_DEV" ]; then |
13 |
log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device" |
14 |
|
15 |
fi |
16 |
if [ -z "$SNF_IMAGE_TYPE" ]; then |
17 |
log_error "Image type does not exist" |
18 |
fi |
19 |
|
20 |
if [ "$SNF_IMAGE_TYPE" = "extdump" ]; then |
21 |
$RESIZE2FS $SNF_IMAGE_DEV |
22 |
fi |
23 |
|
24 |
exit 0 |
25 |
|
26 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |