: ${HELPER_IMG:="@HELPER_IMG@"}
: ${HELPER_KERNEL:="@HELPER_KERNEL@"}
: ${HELPER_INITRD:="@HELPER_INITRD@"}
-: ${HELPER_PKG:="@HELPER_DIR@/snf-image-helper.deb"}
: ${HELPER_SOFT_TIMEOUT:=20}
: ${HELPER_HARD_TIMEOUT:=5}
: ${HELPER_USER:="nobody"}
# HELPER_INITRD: Path to the helper VM initial ramdisk
# HELPER_INITRD="${HELPER_DIR}/initrd"
-# HELPER_PKG: Path to the snf-image-helper package
-# HELPER_PKG="${HELPER_DIR}/snf-image-helper.deb"
-
# 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
-p PACKAGE
Install this deb package in the helper image, instead of the default
- [default: $HELPER_PKG]
-r Don't use any existing cache
pkg_installed=$(grep snf-image-helper "$HELPER_DIR/packages" > /dev/null && echo yes)
-if [ ! -r "$HELPER_PKG" -a -z "$pkg_installed" ]; then
- log_error "ERROR:"
- log_error "Helper package \`$HELPER_PKG' does not exist or is not" \
- "readable by the script."
+if [ -z "$HELPER_PKG" -a -z "$pkg_installed" ]; then
+ log_error "No helper package was specified and non was found by the apt."
exit 1
fi
echo "snf-image-helper pkg was installed from the apt repository."
fi
-if [ "$VERSION_CHECK" == yes ]; then
+if [ "$VERSION_CHECK" == yes -a -z "$HELPER_PKG" ]; then
helper_version="$(grep ^snf-image-helper[[:space:]] "$HELPER_DIR/packages" | cut -f2)"
host_version="$(dpkg-query -W -f "\${Version}\n" snf-image-host)"
if [ "$host_version" != "$helper_version" ]; then