Commit c6b8baba authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add configure option for init.d/ssh script. This is useful for distributions

with the script named differently than Debian.

Reviewed-by: ultrotter
parent 5b209f0c
......@@ -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
......
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)'"; \
} > $@
......@@ -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
......
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