Revision 2a0c492d
b/snf-image-helper/common.sh | ||
---|---|---|
153 | 153 |
|
154 | 154 |
check_if_excluded() { |
155 | 155 |
|
156 |
test "$PROGNAME" = "snf-image-helper" && return 0 |
|
157 |
|
|
158 | 156 |
local exclude=SNF_IMAGE_PROPERTY_EXCLUDE_TASK_${PROGNAME:2} |
159 | 157 |
if [ -n "${!exclude}" ]; then |
160 | 158 |
warn "Task $PROGNAME was excluded and will not run." |
... | ... | |
166 | 164 |
|
167 | 165 |
trap cleanup EXIT |
168 | 166 |
|
169 |
# Check if the execution of a task should be ommited |
|
170 |
check_if_excluded |
|
171 |
|
|
172 | 167 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |
b/snf-image-helper/tasks/10FixPartitionTable.in | ||
---|---|---|
26 | 26 |
set -e |
27 | 27 |
. "@commondir@/common.sh" |
28 | 28 |
|
29 |
# Check if the task should be prevented from running. |
|
30 |
check_if_excluded |
|
31 |
|
|
29 | 32 |
if [ ! -b "$SNF_IMAGE_DEV" ]; then |
30 | 33 |
log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device" |
31 | 34 |
fi |
b/snf-image-helper/tasks/20FilesystemResizeUnmounted.in | ||
---|---|---|
27 | 27 |
set -e |
28 | 28 |
. "@commondir@/common.sh" |
29 | 29 |
|
30 |
# Check if the task should be prevented from running. |
|
31 |
check_if_excluded |
|
32 |
|
|
30 | 33 |
if [ ! -b "$SNF_IMAGE_DEV" ]; then |
31 | 34 |
log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device" |
32 | 35 |
fi |
b/snf-image-helper/tasks/40DeleteSSHKeys.in | ||
---|---|---|
27 | 27 |
set -e |
28 | 28 |
. "@commondir@/common.sh" |
29 | 29 |
|
30 |
# Check if the task should be prevented from running. |
|
31 |
check_if_excluded |
|
32 |
|
|
30 | 33 |
if [ ! -d "$SNF_IMAGE_TARGET" ]; then |
31 | 34 |
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing." |
32 | 35 |
fi |
b/snf-image-helper/tasks/40DisableRemoteDesktopConnections.in | ||
---|---|---|
34 | 34 |
set -e |
35 | 35 |
. "@commondir@/common.sh" |
36 | 36 |
|
37 |
# Check if the task should be prevented from running. |
|
38 |
check_if_excluded |
|
39 |
|
|
37 | 40 |
if [ ! -d "$SNF_IMAGE_TARGET" ]; then |
38 | 41 |
log_error "Target directory \`$SNF_IMAGE_TARGET' is missing" |
39 | 42 |
fi |
b/snf-image-helper/tasks/40SELinuxAutorelabel.in | ||
---|---|---|
27 | 27 |
set -e |
28 | 28 |
. "@commondir@/common.sh" |
29 | 29 |
|
30 |
# Check if the task should be prevented from running. |
|
31 |
check_if_excluded |
|
32 |
|
|
30 | 33 |
if [ ! -d "$SNF_IMAGE_TARGET" ]; then |
31 | 34 |
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing" |
32 | 35 |
fi |
b/snf-image-helper/tasks/50AssignHostname.in | ||
---|---|---|
27 | 27 |
set -e |
28 | 28 |
. "@commondir@/common.sh" |
29 | 29 |
|
30 |
# Check if the task should be prevented from running. |
|
31 |
check_if_excluded |
|
32 |
|
|
30 | 33 |
windows_hostname() { |
31 | 34 |
local target="$1" |
32 | 35 |
local password="$2" |
b/snf-image-helper/tasks/50ChangePassword.in | ||
---|---|---|
27 | 27 |
set -e |
28 | 28 |
. "@commondir@/common.sh" |
29 | 29 |
|
30 |
# Check if the task should be prevented from running. |
|
31 |
check_if_excluded |
|
32 |
|
|
30 | 33 |
windows_password() { |
31 | 34 |
local target="$1" |
32 | 35 |
local password="$2" |
b/snf-image-helper/tasks/50EnforcePersonality.in | ||
---|---|---|
29 | 29 |
|
30 | 30 |
. "@commondir@/common.sh" |
31 | 31 |
|
32 |
# Check if the task should be prevented from running. |
|
33 |
check_if_excluded |
|
34 |
|
|
32 | 35 |
if [ ! -d "$SNF_IMAGE_TARGET" ]; then |
33 | 36 |
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing" |
34 | 37 |
fi |
b/snf-image-helper/tasks/50FilesystemResizeMounted.in | ||
---|---|---|
27 | 27 |
set -e |
28 | 28 |
. "@commondir@/common.sh" |
29 | 29 |
|
30 |
# Check if the task should be prevented from running. |
|
31 |
check_if_excluded |
|
32 |
|
|
30 | 33 |
if [ ! -d "$SNF_IMAGE_TARGET" ]; then |
31 | 34 |
log_error "Target directory \`$SNF_IMAGE_TARGET' is missing" |
32 | 35 |
fi |
Also available in: Unified diff