diff --git a/configure.ac b/configure.ac index 64fa9a1b1421cf3995be2fac1a7370c171551957..589271c1cb1939a95fdf7a7096b20ecdeb7cbabe 100644 --- a/configure.ac +++ b/configure.ac @@ -5,6 +5,15 @@ AC_INIT(ganeti, 1.2b2, ganeti@googlegroups.com) AC_CONFIG_AUX_DIR(autotools) AM_INIT_AUTOMAKE([foreign tar-ustar]) +# --with-ssh-initscript=... +AC_ARG_WITH([ssh-initscript], + [AS_HELP_STRING([--with-ssh-initscript], + [SSH init script to use (default is /etc/init.d/ssh)] + )], + [initd_ssh="$withval"], + [initd_ssh="/etc/init.d/ssh"]) +AC_SUBST(INITD_SSH, $initd_ssh) + # Check common programs AC_PROG_INSTALL diff --git a/lib/Makefile.am b/lib/Makefile.am index c32cf6eeb1386a4fa90cbae9b7729fc20c365cdf..c4e4fcd03131f2f007241982900f7e47cfd4ebc7 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,5 +1,7 @@ CLEANFILES = $(nodist_pkgpython_PYTHON) *.py[oc] +INITD_SSH = @INITD_SSH@ + nodist_pkgpython_PYTHON = _autoconf.py pkgpython_PYTHON = __init__.py backend.py cli.py cmdlib.py config.py \ objects.py errors.py logger.py ssh.py utils.py rpc.py \ @@ -13,4 +15,5 @@ _autoconf.py: Makefile echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \ echo "LOCALSTATEDIR = '$(localstatedir)'"; \ echo "SYSCONFDIR = '$(sysconfdir)'"; \ + echo "INITD_SSH = '$(INITD_SSH)'"; \ } > $@ diff --git a/lib/backend.py b/lib/backend.py index 24374d344fec6d4dbf2a0a031cd4be91551f3663..33daa2327d9c1baba2f5bcdd87e5aad90bc5a2be 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -41,6 +41,7 @@ from ganeti import constants from ganeti import bdev from ganeti import objects from ganeti import ssconf +from ganeti import _autoconf def StartMaster(): @@ -120,7 +121,7 @@ def AddNode(dsa, dsapub, rsa, rsapub, sshkey, sshpub): finally: f.close() - utils.RunCmd(["/etc/init.d/ssh", "restart"]) + utils.RunCmd([_autoconf.INITD_SSH, "restart"]) return True