Commit 68d58128 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Cleanup variables and ./configure options

Remove:
	HELPER_CACHE_DIR
	HELPER_IMG
	HELPER_KERNEL
	HELPER_INITRD
 	TIMELIMIT
Add:
	TIMEOUT

In configure, remove:
	--enable-network-backend
	--with-helper-img
	--with-helper-kernel
	--with-helper-initrd
parent c560d175
......@@ -23,10 +23,6 @@ edit = sed \
-e 's|@defaultdir[@]|$(defaultdir)|g' \
-e 's|@VERSION_CHECK[@]|$(VERSION_CHECK)|g' \
-e 's|@HELPER_DIR[@]|$(HELPER_DIR)|g' \
-e 's|@HELPER_IMG[@]|$(HELPER_IMG)|g' \
-e 's|@HELPER_KERNEL[@]|$(HELPER_KERNEL)|g' \
-e 's|@HELPER_INITRD[@]|$(HELPER_INITRD)|g' \
-e 's|@HELPER_PKG[@]|$(HELPER_PKG)|g' \
-e 's|@AWK[@]|$(AWK)|g' \
-e 's|@MKDIR_P[@]|$(MKDIR_P)|g' \
-e 's|@LOSETUP[@]|$(LOSETUP)|g' \
......
......@@ -17,8 +17,8 @@
# 02110-1301, USA.
AWK="awk"
KPARTX="kpartx"
LOSETUP="losetup"
KPARTX="kpartx"
SFDISK="sfdisk"
QEMU_IMG="qemu-img"
INSTALL_MBR="install-mbr"
......@@ -372,14 +372,9 @@ fi
: ${IMAGE_DEBUG:="no"}
: ${VERSION_CHECK:="@VERSION_CHECK@"}
: ${HELPER_DIR:="@HELPER_DIR@"}
: ${HELPER_IMG:="@HELPER_IMG@"}
: ${HELPER_KERNEL:="@HELPER_KERNEL@"}
: ${HELPER_INITRD:="@HELPER_INITRD@"}
: ${HELPER_SOFT_TIMEOUT:=20}
: ${HELPER_HARD_TIMEOUT:=5}
: ${HELPER_USER:="nobody"}
: ${HELPER_EXTRA_PKGS:="linux-image-amd64,e2fsprogs,ntfs-3g,ntfsprogs,xmlstarlet,python,parted,reglookup,chntpw,util-linux"}
: ${HELPER_MIRROR:=""}
: ${PITHOS_DB:="sqlite:////@localstatedir@/lib/pithos/backend.db"}
: ${PITHOS_DATA:="@localstatedir@/lib/pithos/data/"}
: ${PROGRESS_MONITOR:="@PROGRESS_MONITOR@"}
......
......@@ -7,13 +7,7 @@ AC_CONFIG_SRCDIR(configure)
AM_INIT_AUTOMAKE([1.9 foreign tar-ustar -Wall -Wno-portability])
AM_INIT_AUTOMAKE([subdir-objects])
AC_ARG_ENABLE([network_backend],
AS_HELP_STRING([--enable-network-backend],
[enable support for network-hosted images
(this depends on cURL)])
)
# --enable-version-consistency-ckeck
AC_ARG_ENABLE([version_consistency_check],
AS_HELP_STRING([--enable-version-consistency-check],
[Check if the host and the helper packages have the same version]),
......@@ -91,33 +85,6 @@ AC_ARG_WITH([helper-dir],
[helper_dir="$localstatedir/lib/snf-image/helper"])
AC_SUBST(HELPER_DIR, $helper_dir)
# --with-helper-img
AC_ARG_WITH([helper-img],
[AS_HELP_STRING([--with-helper-img=IMG_PATH],
[Path to helper VM image [HELPERDIR/image]]
)],
[helper_img="$withval"],
[helper_img="$helper_dir/image"])
AC_SUBST(HELPER_IMG, $helper_img)
# --with-helper-kernel
AC_ARG_WITH([helper-kernel],
[AS_HELP_STRING([--with-helper-kernel=KERNEL_PATH],
[Path to the helper VM kernel [HELPERDIR/kernel]]
)],
[helper_ernel="$withval"],
[helper_kernel="$helper_dir/kernel"])
AC_SUBST(HELPER_KERNEL, ${helper_kernel})
# --with-helper-initrd..
AC_ARG_WITH([helper-initrd],
[AS_HELP_STRING([--with-helper-initrd=INITRD_PATH],
[Path to the helper VM initial ramdist [HELPERDIR/initrd]]
)],
[helper_initrd="$withval"],
[helper_initrd="$helper_dir/initrd"])
AC_SUBST(HELPER_INITRD, ${helper_initrd})
# --with-os-dir=...
AC_ARG_WITH([os-dir],
[AS_HELP_STRING([--with-os-dir=DIR],
......
......@@ -163,7 +163,7 @@ add_cleanup rm "$result_file"
snapshot=$(mktemp --tmpdir="$jail" helperXXXXXX.img)
add_cleanup rm "$snapshot"
"$QEMU_IMG" create -f qcow2 -b "$HELPER_IMG" "$snapshot"
"$QEMU_IMG" create -f qcow2 -b "$HELPER_DIR/image" "$snapshot"
report_info "Starting customization VM..."
echo "$($DATE +%Y:%m:%d-%H:%M:%S.%N) VM START" >&2
......@@ -174,7 +174,7 @@ $TIMEOUT -k "$HELPER_HARD_TIMEOUT" "$HELPER_SOFT_TIMEOUT" \
-boot c -serial stdio -serial "file:$(printf "%q" "$result_file")" \
-serial file:>(./helper-monitor.py ${MONITOR_FD}) \
-fda "$floppy" -vga none -nographic -parallel none -monitor null \
-kernel "$HELPER_KERNEL" -initrd "$HELPER_INITRD" \
-kernel "$HELPER_DIR/kernel" -initrd "$HELPER_DIR/initrd" \
-append "quiet ro root=/dev/sda1 console=ttyS0,9600n8 snf_image_activate_helper init=/usr/bin/snf-image-helper" \
2>&1 | sed -u 's|^|HELPER: |g'
rc=$?
......
......@@ -20,26 +20,13 @@
# HELPER_DIR: Directory hosting the helper files
# HELPER_DIR="/var/lib/snf-image/helper/"
# HELPER_CACHE_DIR: Directory hosting the helper cache files
# HELPER_CACHE_DIR="/var/cache/snf-image/helper/"
# HELPER_IMG: Path to the helper VM image
# HELPER_IMG="${HELPER_DIR}/image"
# HELPER_KERNEL: Path to the helper VM kernel
# HELPER_KERNEL="${HELPER_DIR}/kernel"
# HELPER_INITRD: Path to the helper VM initial ramdisk
# HELPER_INITRD="${HELPER_DIR}/initrd"
# HELPER_TIMOUT: Soft and hard timeout limits for helper instance.
# The helper instance will be terminated after a given time if it hasn't exited
# by itself. A TERM signal will be send if the instance is running after
# a HELPER_SOFT_TIMEOUT interval. A KILL signal will be sent, if the instance
# is still running after a HELPER_HARD_TIMEOUT interval since the initial
# signal was sent. The timeout values are integer numbers with an optional
# suffix: `s' for seconds (the default), `m' for minutes, `h' for hours or `d'
# for days.
# HELPER_TIMOUT: Soft and hard timeout limits for helper instance. The helper
# instance will be terminated after a given time if it hasn't exited by itself.
# A TERM signal will be send if the instance is running after a
# HELPER_SOFT_TIMEOUT interval. A KILL signal will be sent, if the instance is
# still running after a HELPER_HARD_TIMEOUT interval since the initial signal
# was sent. The timeout values are integer numbers with an optional suffix: `s'
# for seconds (the default), `m' for minutes, `h' for hours or `d' for days.
# HELPER_SOFT_TIMEOUT="20"
# HELPER_HARD_TIMEOUT="5"
......@@ -80,5 +67,5 @@
# SFDISK="sfdisk"
# QEMU_IMG="qemu-img"
# INSTALL_MBR="install-mbr"
# TIMELIMIT="timelimit"
# TIMEOUT="timeout"
# CURL="curl"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment