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) ...@@ -5,6 +5,15 @@ AC_INIT(ganeti, 1.2b2, ganeti@googlegroups.com)
AC_CONFIG_AUX_DIR(autotools) AC_CONFIG_AUX_DIR(autotools)
AM_INIT_AUTOMAKE([foreign tar-ustar]) 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 # Check common programs
AC_PROG_INSTALL AC_PROG_INSTALL
......
CLEANFILES = $(nodist_pkgpython_PYTHON) *.py[oc] CLEANFILES = $(nodist_pkgpython_PYTHON) *.py[oc]
INITD_SSH = @INITD_SSH@
nodist_pkgpython_PYTHON = _autoconf.py nodist_pkgpython_PYTHON = _autoconf.py
pkgpython_PYTHON = __init__.py backend.py cli.py cmdlib.py config.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 \ objects.py errors.py logger.py ssh.py utils.py rpc.py \
...@@ -13,4 +15,5 @@ _autoconf.py: Makefile ...@@ -13,4 +15,5 @@ _autoconf.py: Makefile
echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \ echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
echo "LOCALSTATEDIR = '$(localstatedir)'"; \ echo "LOCALSTATEDIR = '$(localstatedir)'"; \
echo "SYSCONFDIR = '$(sysconfdir)'"; \ echo "SYSCONFDIR = '$(sysconfdir)'"; \
echo "INITD_SSH = '$(INITD_SSH)'"; \
} > $@ } > $@
...@@ -41,6 +41,7 @@ from ganeti import constants ...@@ -41,6 +41,7 @@ from ganeti import constants
from ganeti import bdev from ganeti import bdev
from ganeti import objects from ganeti import objects
from ganeti import ssconf from ganeti import ssconf
from ganeti import _autoconf
def StartMaster(): def StartMaster():
...@@ -120,7 +121,7 @@ def AddNode(dsa, dsapub, rsa, rsapub, sshkey, sshpub): ...@@ -120,7 +121,7 @@ def AddNode(dsa, dsapub, rsa, rsapub, sshkey, sshpub):
finally: finally:
f.close() f.close()
utils.RunCmd(["/etc/init.d/ssh", "restart"]) utils.RunCmd([_autoconf.INITD_SSH, "restart"])
return True 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