10ResizeUnmounted.sh 534 Bytes
Newer Older
Nikos Skalkotos's avatar
Nikos Skalkotos committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /bin/sh

### BEGIN TASK INFO
# Provides:		ResizeUnmounted
# RunBefore:		MountImage
# Short-Description:	Resize filesystem to use all the available space
### END TAST INFO

set -e
. /usr/share/snf-image/common.sh

if [ -z "$SNF_IMAGE_DEV" ]; then
    log_error "Device file:\`$SNF_IMAGE_DEV\' is not a block device"

fi
if [ -z "$SNF_IMAGE_TYPE" ]; then
    log_error "Image type does not exist"
fi

if [ "$SNF_IMAGE_TYPE" = "extdump" ]; then
    $RESIZE2FS $SNF_IMAGE_DEV
fi	

exit 0
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :