echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
echo "KVM_PATH = '$(KVM_PATH)'"; \
+ echo "SOCAT_PATH = '$(SOCAT_PATH)'"; \
} > $@
$(REPLACE_VARS_SED): Makefile stamp-directories
[kvm_path="/usr/bin/kvm"])
AC_SUBST(KVM_PATH, $kvm_path)
+# --with-socat-path=...
+AC_ARG_WITH([socat-path],
+ [AS_HELP_STRING([--with-socat-path=PATH],
+ [absolute path to the socat binary]
+ [ (default is /usr/bin/socat)]
+ )],
+ [socat_path="$withval"],
+ [socat_path="/usr/bin/socat"])
+AC_SUBST(SOCAT_PATH, $socat_path)
+
# Check common programs
AC_PROG_INSTALL
AC_PROG_LN_S
XEN_INITRD = _autoconf.XEN_INITRD
KVM_PATH = _autoconf.KVM_PATH
+SOCAT_PATH = _autoconf.SOCAT_PATH
VALUE_DEFAULT = "default"
VALUE_AUTO = "auto"
"""Stop an instance.
"""
+ socat_bin = constants.SOCAT_PATH
pid_file = self._PIDS_DIR + "/%s" % instance.name
pid = utils.ReadPidFile(pid_file)
if pid > 0 and utils.IsProcessAlive(pid):
else:
# This only works if the instance os has acpi support
monitor_socket = '%s/%s.monitor' % (self._CTRL_DIR, instance.name)
- socat = 'socat -u STDIN UNIX-CONNECT:%s' % monitor_socket
+ socat = '%s -u STDIN UNIX-CONNECT:%s' % (socat_bin, monitor_socket)
command = "echo 'system_powerdown' | %s" % socat
result = utils.RunCmd(command)
if result.failed:
"""
if not os.path.exists(constants.KVM_PATH):
return "The kvm binary ('%s') does not exist." % constants.KVM_PATH
+ if not os.path.exists(constants.SOCAT_PATH):
+ return "The socat binary ('%s') does not exist." % constants.SOCAT_PATH
+
@classmethod
def CheckParameterSyntax(cls, hvparams):