root / helper / tasks / 30MountImage.in @ c4447efb
History | View | Annotate | Download (500 Bytes)
1 |
#! /bin/bash |
---|---|
2 |
|
3 |
### BEGIN TASK INFO |
4 |
# Provides: MountImage |
5 |
# RunBefore: UmountImage |
6 |
# Short-Description: Mount the partition that hosts the image |
7 |
### END TAST INFO |
8 |
|
9 |
set -e |
10 |
. @commondir@/common.sh |
11 |
|
12 |
if [ ! -d "$SNF_IMAGE_TARGET" ]; then |
13 |
log_error "Target dir:\`$SNF_IMAGE_TARGET' is missing" |
14 |
fi |
15 |
|
16 |
if [ ! -b "$SNF_IMAGE_DEV" ]; then |
17 |
log_error "Device file:\`$SNF_IMAGE_DEV' is not a block device" |
18 |
fi |
19 |
|
20 |
mount $SNF_IMAGE_DEV $SNF_IMAGE_TARGET |
21 |
|
22 |
exit 0 |
23 |
|
24 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |