Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.1 kB)

1 0a35a4ab Nikos Skalkotos
#! /bin/bash
2 c349d1b3 Nikos Skalkotos
3 7e5d635b Nikos Skalkotos
# Copyright (C) 2011 GRNET S.A. 
4 7e5d635b Nikos Skalkotos
#
5 7e5d635b Nikos Skalkotos
# This program is free software; you can redistribute it and/or modify
6 7e5d635b Nikos Skalkotos
# it under the terms of the GNU General Public License as published by
7 7e5d635b Nikos Skalkotos
# the Free Software Foundation; either version 2 of the License, or
8 7e5d635b Nikos Skalkotos
# (at your option) any later version.
9 7e5d635b Nikos Skalkotos
#
10 7e5d635b Nikos Skalkotos
# This program is distributed in the hope that it will be useful, but
11 7e5d635b Nikos Skalkotos
# WITHOUT ANY WARRANTY; without even the implied warranty of
12 7e5d635b Nikos Skalkotos
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 7e5d635b Nikos Skalkotos
# General Public License for more details.
14 7e5d635b Nikos Skalkotos
#
15 7e5d635b Nikos Skalkotos
# You should have received a copy of the GNU General Public License
16 7e5d635b Nikos Skalkotos
# along with this program; if not, write to the Free Software
17 7e5d635b Nikos Skalkotos
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 7e5d635b Nikos Skalkotos
# 02110-1301, USA.
19 7e5d635b Nikos Skalkotos
20 c349d1b3 Nikos Skalkotos
### BEGIN TASK INFO
21 c349d1b3 Nikos Skalkotos
# Provides:		UmountImage
22 c349d1b3 Nikos Skalkotos
# RunBefore:
23 c349d1b3 Nikos Skalkotos
# RunAfter:		MountImage
24 c349d1b3 Nikos Skalkotos
# Short-Description:	Umount the partition that hosts the image
25 6a95db10 Vangelis Koukis
### END TASK INFO
26 c349d1b3 Nikos Skalkotos
27 c349d1b3 Nikos Skalkotos
set -e
28 bad5ca1f Nikos Skalkotos
. "@commondir@/common.sh"
29 c349d1b3 Nikos Skalkotos
30 8704ee47 Nikos Skalkotos
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
31 8704ee47 Nikos Skalkotos
	log_error "Target dir:\`$SNF_IMAGE_TARGET' is missing"
32 c349d1b3 Nikos Skalkotos
fi
33 c349d1b3 Nikos Skalkotos
34 bad5ca1f Nikos Skalkotos
umount "$SNF_IMAGE_TARGET"
35 c349d1b3 Nikos Skalkotos
36 c349d1b3 Nikos Skalkotos
exit 0
37 5d3735b5 Nikos Skalkotos
38 5d3735b5 Nikos Skalkotos
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :