-if PROGMONSUPPORT
-progress_monitor_support=yes
-else
-progress_monitor_support=no
-endif
-
if PITHOSIMGSUPPORT
pithos_backend_support=yes
else
INSTALL_MBR="install-mbr"
TIMELIMIT="timelimit"
CURL="curl"
-PROGRESS_MONITOR="snf-progress-monitor"
-progress_monitor_support="@progress_monitor_support@"
+
pithos_backend_support="@pithos_backend_support@"
network_backend_support="@network_backend_support@"
: ${HELPER_MIRROR:=""}
: ${PITHOS_DB:="sqlite:////@localstatedir@/lib/pithos/backend.db"}
: ${PITHOS_DATA:="@localstatedir@/lib/pithos/data/"}
+: ${PROGRESS_MONITOR:="@PROGRESS_MONITOR@"}
SCRIPT_NAME=$(basename $0)
# --with-progress-monitor
AC_ARG_WITH([progress-monitor],
[AS_HELP_STRING([--with-progress-monitor=PRGRM_PATH],
- [path to progress-monitor program]
- [[snf-progress-monitor]])],
- [if test "$withval" = "yes" ; then
- AC_PATH_PROG(PROGRESS_MONITOR, [snf-progress-monitor], [], [$PATH:/usr/sbin:/sbin])
+ [path to progress-monitor program []])],
+ [if test "$withval" != "yes" -a "$withval" != "no"; then
+ AC_PATH_PROG(PROGRESS_MONITOR, ["$withval"], [], [$PATH:/usr/sbin:/sbin])
if test -z "$PROGRESS_MONITOR" ; then
- AC_MSG_FAILURE([Could not find snf-progress-monitor.])
+ AC_MSG_FAILURE([Could not find progress-monitor: $withval.])
fi
- else
PROGRESS_MONITOR="$withval"
- fi],
- [AC_MSG_NOTICE(progress-monitor support not enabled)]
+ elif test "$withval" != "no"; then
+ AC_MSG_ERROR([you must specify a value for progress-monitor if --with-progress-monitor is specified])
+ fi]
)
-AM_CONDITIONAL(PROGMONSUPPORT, [test -n "$PROGRESS_MONITOR"])
# --with-helper-dir
AC_ARG_WITH([helper-dir],
;;
esac
-monitor="" #Empty if progress monitor support is disabled
-if [ "$progress_monitor_support" = "yes" ]; then
+monitor="" # Empty if no progress monitor program is not defined.
+if [ -n "$PROGRESS_MONITOR" ]; then
monitor="$PROGRESS_MONITOR \
-i $(printf "%q" "$INSTANCE_NAME") -r $image_size"
fi
# PITHOS_DATA: Directory where pithos data are hosted
# PITHOS_DATA="/var/lib/pithos/data"
-# Paths for needed programs. Uncommend and change the variables below, if you
+# PROGRESS_MONITOR: External program that monitors the progress of the image
+# deployment. For now, this program is treated by snf-image as a decorator for
+# the raw copy command that copies the image file to the instance's hard disk.
+# This program must support the following options:
+# -r, which specifies the expected number of bytes to be written to the disk.
+# -i, which specifies the Ganeti instance name.
+# PROGRESS_MONITOR=""
+
+# Paths for needed programs. Uncommend and change the variables below if you
# don't want to use the default one.
# LOSETUP="losetup"
# KPARTX="kpartx"
# INSTALL_MBR="install-mbr"
# TIMELIMIT="timelimit"
# CURL="curl"
-# PROGRESS_MONITOR="snf-progress-monitor"