From 68dccc073385a6415ca3b878ebf34234e433cd81 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Thu, 27 Sep 2007 16:02:57 +0000 Subject: [PATCH] Make the default export path configurable. This is needed to improve FHS compliance for distribution integration. The need was discussed on the alioth pkg-ganeti project. Reviewed-by: imsnah --- configure.ac | 9 +++++++++ lib/Makefile.am | 1 + lib/constants.py | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 90ffe5aa3..7c8191f1e 100644 --- a/configure.ac +++ b/configure.ac @@ -14,6 +14,15 @@ AC_ARG_WITH([ssh-initscript], [ssh_initd_script="/etc/init.d/ssh"]) AC_SUBST(SSH_INITD_SCRIPT, $ssh_initd_script) +# --with-export-dir=... +AC_ARG_WITH([export-dir], + [AS_HELP_STRING([--with-export-dir=DIR], + [directory to use by default for instance image exports (default is /srv/ganeti/export)] + )], + [export_dir="$withval"], + [export_dir="/srv/ganeti/export"]) +AC_SUBST(EXPORT_DIR, $export_dir) + # Check common programs AC_PROG_INSTALL diff --git a/lib/Makefile.am b/lib/Makefile.am index c6b643658..901b270db 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -16,4 +16,5 @@ _autoconf.py: Makefile echo "LOCALSTATEDIR = '$(localstatedir)'"; \ echo "SYSCONFDIR = '$(sysconfdir)'"; \ echo "SSH_INITD_SCRIPT = '$(SSH_INITD_SCRIPT)'"; \ + echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \ } > $@ diff --git a/lib/constants.py b/lib/constants.py index a495ba570..1594029c1 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -50,7 +50,7 @@ LOG_OS_DIR = LOG_DIR + "/os" LOG_NODESERVER = LOG_DIR + "/node-daemon.log" OS_DIR = "/srv/ganeti/os" -EXPORT_DIR = "/srv/ganeti/export" +EXPORT_DIR = _autoconf.EXPORT_DIR EXPORT_CONF_FILE = "config.ini" -- GitLab