Statistics
| Branch: | Tag: | Revision:

root / snf-image-helper / tasks / 80UmountImage.in @ bad5ca1f

History | View | Annotate | Download (415 Bytes)

1 0a35a4ab Nikos Skalkotos
#! /bin/bash
2 c349d1b3 Nikos Skalkotos
3 c349d1b3 Nikos Skalkotos
### BEGIN TASK INFO
4 c349d1b3 Nikos Skalkotos
# Provides:		UmountImage
5 c349d1b3 Nikos Skalkotos
# RunBefore:
6 c349d1b3 Nikos Skalkotos
# RunAfter:		MountImage
7 c349d1b3 Nikos Skalkotos
# Short-Description:	Umount the partition that hosts the image
8 c349d1b3 Nikos Skalkotos
### END TAST INFO
9 c349d1b3 Nikos Skalkotos
10 c349d1b3 Nikos Skalkotos
set -e
11 bad5ca1f Nikos Skalkotos
. "@commondir@/common.sh"
12 c349d1b3 Nikos Skalkotos
13 8704ee47 Nikos Skalkotos
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
14 8704ee47 Nikos Skalkotos
	log_error "Target dir:\`$SNF_IMAGE_TARGET' is missing"
15 c349d1b3 Nikos Skalkotos
fi
16 c349d1b3 Nikos Skalkotos
17 bad5ca1f Nikos Skalkotos
umount "$SNF_IMAGE_TARGET"
18 c349d1b3 Nikos Skalkotos
19 5d3735b5 Nikos Skalkotos
cleanup
20 5d3735b5 Nikos Skalkotos
trap - EXIT
21 5d3735b5 Nikos Skalkotos
22 c349d1b3 Nikos Skalkotos
exit 0
23 5d3735b5 Nikos Skalkotos
24 5d3735b5 Nikos Skalkotos
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :