===== tools/misc/xend 1.23 vs edited ===== --- 1.23/tools/misc/xend 2005-05-25 03:53:31 +09:00 +++ edited/tools/misc/xend 2005-06-01 16:25:06 +09:00 @@ -27,8 +27,10 @@ XCS_PATH = "/var/lib/xen/xcs_socket" XCS_EXEC = "/usr/sbin/xcs" +XCS_NP_EXEC = "xcs" # xcs with no path XCS_PIDFILE = "/var/run/xcs.pid" XCS_ARGS = (XCS_EXEC, "-p", XCS_PIDFILE) +XCS_NP_ARGS = (XCS_NP_EXEC, "-p", XCS_PIDFILE) # execute xcs with no path # add fallback path for non-native python path installs if needed sys.path.append('/usr/lib/python') @@ -92,12 +94,15 @@ if not os.path.isdir(os.path.dirname(XCS_PATH)): os.makedirs(os.path.dirname(XCS_PATH)) try: - os.execvp(XCS_EXEC, XCS_ARGS) + os.execvp(XCS_NP_EXEC, XCS_NP_ARGS) # execute xcs with no path except: - hline() - msg("Tried to start xcs, but failed. Is it installed?") - hline() - raise CheckError("couldn't start xcs") + try: + os.execv(XCS_EXEC, XCS_ARGS) # fallback to execute xcs in default path + except: + hline() + msg("Tried to start xcs, but failed. Is it installed?") + hline() + raise CheckError("couldn't start xcs") if (not xcs_running()): hline() msg("Failed to start the control interface switch.")