Revision 14aa53cb

b/Makefile.am
294 294
	  echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
295 295
	  echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
296 296
	  echo "KVM_PATH = '$(KVM_PATH)'"; \
297
	  echo "SOCAT_PATH = '$(SOCAT_PATH)'"; \
297 298
	} > $@
298 299

  
299 300
$(REPLACE_VARS_SED): Makefile stamp-directories
b/configure.ac
99 99
  [kvm_path="/usr/bin/kvm"])
100 100
AC_SUBST(KVM_PATH, $kvm_path)
101 101

  
102
# --with-socat-path=...
103
AC_ARG_WITH([socat-path],
104
  [AS_HELP_STRING([--with-socat-path=PATH],
105
    [absolute path to the socat binary]
106
    [ (default is /usr/bin/socat)]
107
  )],
108
  [socat_path="$withval"],
109
  [socat_path="/usr/bin/socat"])
110
AC_SUBST(SOCAT_PATH, $socat_path)
111

  
102 112
# Check common programs
103 113
AC_PROG_INSTALL
104 114
AC_PROG_LN_S
b/lib/constants.py
131 131
XEN_INITRD = _autoconf.XEN_INITRD
132 132

  
133 133
KVM_PATH = _autoconf.KVM_PATH
134
SOCAT_PATH = _autoconf.SOCAT_PATH
134 135

  
135 136
VALUE_DEFAULT = "default"
136 137
VALUE_AUTO = "auto"
b/lib/hypervisor/hv_kvm.py
256 256
    """Stop an instance.
257 257

  
258 258
    """
259
    socat_bin = constants.SOCAT_PATH
259 260
    pid_file = self._PIDS_DIR + "/%s" % instance.name
260 261
    pid = utils.ReadPidFile(pid_file)
261 262
    if pid > 0 and utils.IsProcessAlive(pid):
......
264 265
      else:
265 266
        # This only works if the instance os has acpi support
266 267
        monitor_socket = '%s/%s.monitor'  % (self._CTRL_DIR, instance.name)
267
        socat = 'socat -u STDIN UNIX-CONNECT:%s' % monitor_socket
268
        socat = '%s -u STDIN UNIX-CONNECT:%s' % (socat_bin, monitor_socket)
268 269
        command = "echo 'system_powerdown' | %s" % socat
269 270
        result = utils.RunCmd(command)
270 271
        if result.failed:
......
352 353
    """
353 354
    if not os.path.exists(constants.KVM_PATH):
354 355
      return "The kvm binary ('%s') does not exist." % constants.KVM_PATH
356
    if not os.path.exists(constants.SOCAT_PATH):
357
      return "The socat binary ('%s') does not exist." % constants.SOCAT_PATH
358

  
355 359

  
356 360
  @classmethod
357 361
  def CheckParameterSyntax(cls, hvparams):

Also available in: Unified diff