From f491c3a8d1ee8ec64625f694a76492e5c3cafbea Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Tue, 25 Sep 2007 13:04:25 +0000 Subject: [PATCH] Rename constants for SSH init script by Iustin's request. Reviewed-by: iustinp --- configure.ac | 6 +++--- lib/Makefile.am | 6 +++--- lib/backend.py | 3 +-- lib/constants.py | 1 + 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 589271c1c..e31e63d75 100644 --- a/configure.ac +++ b/configure.ac @@ -10,9 +10,9 @@ 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) + [ssh_initd_script="$withval"], + [ssh_initd_script="/etc/init.d/ssh"]) +AC_SUBST(SSH_INITD_SCRIPT, $ssh_initd_script) # Check common programs AC_PROG_INSTALL diff --git a/lib/Makefile.am b/lib/Makefile.am index c4e4fcd03..c6b643658 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,6 +1,6 @@ -CLEANFILES = $(nodist_pkgpython_PYTHON) *.py[oc] +SSH_INITD_SCRIPT = @SSH_INITD_SCRIPT@ -INITD_SSH = @INITD_SSH@ +CLEANFILES = $(nodist_pkgpython_PYTHON) *.py[oc] nodist_pkgpython_PYTHON = _autoconf.py pkgpython_PYTHON = __init__.py backend.py cli.py cmdlib.py config.py \ @@ -15,5 +15,5 @@ _autoconf.py: Makefile echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \ echo "LOCALSTATEDIR = '$(localstatedir)'"; \ echo "SYSCONFDIR = '$(sysconfdir)'"; \ - echo "INITD_SSH = '$(INITD_SSH)'"; \ + echo "SSH_INITD_SCRIPT = '$(SSH_INITD_SCRIPT)'"; \ } > $@ diff --git a/lib/backend.py b/lib/backend.py index 33daa2327..4314a6392 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -41,7 +41,6 @@ from ganeti import constants from ganeti import bdev from ganeti import objects from ganeti import ssconf -from ganeti import _autoconf def StartMaster(): @@ -121,7 +120,7 @@ def AddNode(dsa, dsapub, rsa, rsapub, sshkey, sshpub): finally: f.close() - utils.RunCmd([_autoconf.INITD_SSH, "restart"]) + utils.RunCmd([constants.SSH_INITD_SCRIPT, "restart"]) return True diff --git a/lib/constants.py b/lib/constants.py index f3d80ec3c..a495ba570 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -39,6 +39,7 @@ WATCHER_STATEFILE = DATA_DIR + "/restart_state" SSH_KNOWN_HOSTS_FILE = DATA_DIR + "/known_hosts" NODE_INITD_SCRIPT = _autoconf.SYSCONFDIR + "/init.d/ganeti" +SSH_INITD_SCRIPT = _autoconf.SSH_INITD_SCRIPT DEFAULT_NODED_PORT = 1811 FIRST_DRBD_PORT = 11000 LAST_DRBD_PORT = 14999 -- GitLab