check_if_excluded() {
- test "$PROGNAME" = "snf-image-helper" && return 0
-
local exclude=SNF_IMAGE_PROPERTY_EXCLUDE_TASK_${PROGNAME:2}
if [ -n "${!exclude}" ]; then
warn "Task $PROGNAME was excluded and will not run."
trap cleanup EXIT
-# Check if the execution of a task should be ommited
-check_if_excluded
-
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
if [ ! -b "$SNF_IMAGE_DEV" ]; then
log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device"
fi
set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
if [ ! -b "$SNF_IMAGE_DEV" ]; then
log_error "Device file:\`${SNF_IMAGE_DEV}' is not a block device"
fi
set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing."
fi
set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target directory \`$SNF_IMAGE_TARGET' is missing"
fi
set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing"
fi
set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
windows_hostname() {
local target="$1"
local password="$2"
set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
windows_password() {
local target="$1"
local password="$2"
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target dir: \`$SNF_IMAGE_TARGET' is missing"
fi
set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
if [ ! -d "$SNF_IMAGE_TARGET" ]; then
log_error "Target directory \`$SNF_IMAGE_TARGET' is missing"
fi