50EnforcePersonality.in 603 Bytes
Newer Older
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
26
27
28
29
#! /bin/bash

### BEGIN TASK INFO
# Provides:		EnforcePersonality
# RunBefore:		UmountImage
# RunAfter:		DeleteSSHKeys
# Short-Description:	Inject files to the instance
### END TASK INFO

set -e
set -o pipefail

. "@commondir@/common.sh"

if [ ! -d "$SNF_IMAGE_TARGET" ]; then
    log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing"
fi

if [ -n "$SNF_IMAGE_PERSONALITY" ]; then
    echo "$SNF_IMAGE_PERSONALITY" |
        @scriptsdir@/inject-files.py "$SNF_IMAGE_TARGET"
else
    warn "This image has no personality (0 files to inject)\n"
fi

exit 0

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