Revision e7a2d1ad
b/common.sh.in | ||
---|---|---|
31 | 31 |
echo "$@" >&2 |
32 | 32 |
} |
33 | 33 |
|
34 |
debug() { |
|
35 |
[ "$IMAGE_DEBUG" == "1" ] && $@ || : |
|
36 |
} |
|
37 |
|
|
34 | 38 |
get_api5_arguments() { |
35 | 39 |
GETOPT_RESULT=$* |
36 | 40 |
# Note the quotes around `$TEMP': they are essential! |
b/create | ||
---|---|---|
21 | 21 |
|
22 | 22 |
. common.sh |
23 | 23 |
|
24 |
if [ "${IMAGE_DEBUG} " = 1 ] ; then |
|
25 |
set -x |
|
26 |
fi |
|
24 |
debug set -x |
|
27 | 25 |
|
28 |
IMAGE_FILE="" |
|
29 | 26 |
if [ "$IMAGE_TYPE" = "tarball" ] ; then |
30 | 27 |
IMAGE_FILE="${IMAGE_DIR}/${IMAGE_NAME}-${ARCH}.tar.gz" |
31 | 28 |
elif [ "$IMAGE_TYPE" = "qemu" ] ; then |
b/example/instance-image.d/grub | ||
---|---|---|
26 | 26 |
|
27 | 27 |
. common.sh |
28 | 28 |
|
29 |
if [ "${IMAGE_DEBUG} " = 1 ] ; then |
|
30 |
set -x |
|
31 |
fi |
|
29 |
debug set -x |
|
32 | 30 |
|
33 | 31 |
CLEANUP=( ) |
34 | 32 |
|
b/example/instance-image.d/interfaces | ||
---|---|---|
24 | 24 |
|
25 | 25 |
. common.sh |
26 | 26 |
|
27 |
if [ "${IMAGE_DEBUG} " = 1 ] ; then |
|
28 |
set -x |
|
29 |
fi |
|
27 |
debug set -x |
|
30 | 28 |
|
31 | 29 |
DIG="$(which dig)" |
32 | 30 |
|
b/example/instance-image.d/ssh | ||
---|---|---|
23 | 23 |
|
24 | 24 |
. common.sh |
25 | 25 |
|
26 |
if [ "${IMAGE_DEBUG} " = 1 ] ; then |
|
27 |
set -x |
|
28 |
fi |
|
26 |
debug set -x |
|
29 | 27 |
|
30 | 28 |
if [ -e ${TARGET}/etc/debian_version ] ; then |
31 | 29 |
echo "Debian/Ubuntu create keys at install time, skipping" |
b/export | ||
---|---|---|
21 | 21 |
|
22 | 22 |
. common.sh |
23 | 23 |
|
24 |
if [ "${IMAGE_DEBUG}" = "1" ] ; then |
|
25 |
set -x |
|
26 |
fi |
|
24 |
debug set -x |
|
27 | 25 |
|
28 | 26 |
# If the target device is not a real block device we'll first losetup it. |
29 | 27 |
# This is needed for file disks. |
b/import | ||
---|---|---|
21 | 21 |
|
22 | 22 |
. common.sh |
23 | 23 |
|
24 |
if [ "${IMAGE_DEBUG}" = "1" ] ; then |
|
25 |
set -x |
|
26 |
fi |
|
24 |
debug set -x |
|
27 | 25 |
|
28 | 26 |
# If the target device is not a real block device we'll first losetup it. |
29 | 27 |
# This is needed for file disks. |
b/rename | ||
---|---|---|
19 | 19 |
|
20 | 20 |
set -e |
21 | 21 |
|
22 |
if [ "${IMAGE_DEBUG}" = "1" ] ; then |
|
23 |
set -x |
|
24 |
fi |
|
25 |
|
|
26 | 22 |
. common.sh |
27 | 23 |
|
24 |
debug set -x |
|
25 |
|
|
28 | 26 |
TARGET=`mktemp -d` || exit 1 |
29 | 27 |
CLEANUP+=("rmdir $TARGET") |
30 | 28 |
|
Also available in: Unified diff