Author: waldi Date: Sun May 10 15:40:23 2009 New Revision: 635 Log: * debian/patches/series * debian/patches/tools-misc-prefix.diff: Readd missing parts. * debian/patches/tools-misc-xend-startup.diff: Don''t ever start other daemons. Added: trunk/xen-3/debian/patches/tools-misc-xend-startup.diff Modified: trunk/xen-3/debian/patches/series trunk/xen-3/debian/patches/tools-misc-prefix.diff Modified: trunk/xen-3/debian/patches/series =============================================================================--- trunk/xen-3/debian/patches/series Sun May 10 15:25:05 2009 (r634) +++ trunk/xen-3/debian/patches/series Sun May 10 15:40:23 2009 (r635) @@ -37,6 +37,7 @@ tools-libxc-abiname.diff tools-python-xen-xm-relative-path.diff +tools-misc-xend-startup.diff config-ioemu-disable.diff Modified: trunk/xen-3/debian/patches/tools-misc-prefix.diff =============================================================================--- trunk/xen-3/debian/patches/tools-misc-prefix.diff Sun May 10 15:25:05 2009 (r634) +++ trunk/xen-3/debian/patches/tools-misc-prefix.diff Sun May 10 15:40:23 2009 (r635) @@ -42,3 +42,37 @@ .PHONY: clean clean: +--- a/tools/misc/xend ++++ b/tools/misc/xend +@@ -33,15 +33,10 @@ + import time + import commands + +-xpp = os.path.join(os.path.dirname(sys.argv[0]), ''xen-python-path'') +-if os.path.exists(xpp): +- result = commands.getstatusoutput(xpp) +- if result[0] != 0: +- print >>sys.stderr, result[1] +- sys.exit(1) +- sys.path.append(result[1]) ++sys.path.insert(1, sys.path[0] + ''/../lib/python'') + + from xen.xend.server import SrvDaemon ++from xen.util.auxbin import execute + + class CheckError(ValueError): + pass +--- a/tools/misc/xm ++++ b/tools/misc/xm +@@ -1,10 +1,7 @@ + #!/usr/bin/env python + # -*- mode: python; -*- + import sys +- +-# add fallback path for non-native python path installs if needed +-sys.path.append(''/usr/lib/python'') +-sys.path.append(''/usr/lib64/python'') ++sys.path.insert(1, sys.path[0] + ''/../lib/python'') + from xen.xm import main + + main.main(sys.argv) Added: trunk/xen-3/debian/patches/tools-misc-xend-startup.diff =============================================================================--- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/xen-3/debian/patches/tools-misc-xend-startup.diff Sun May 10 15:40:23 2009 (r635) @@ -0,0 +1,68 @@ +--- a/tools/misc/xend ++++ b/tools/misc/xend +@@ -76,40 +76,6 @@ + if os.fork() == 0: + os.execvp(daemon, (daemon,) + args) + +-def start_xenstored(): +- pidfname = "/var/run/xenstore.pid" +- try: +- f = open(pidfname, "a") +- try: +- fcntl.lockf(f, fcntl.LOCK_EX | fcntl.LOCK_NB) +- rootdir = os.getenv("XENSTORED_ROOTDIR") or "/var/lib/xenstored" +- for i in glob.glob(rootdir + "/tdb*"): +- try: +- os.unlink(i) +- except: +- pass +- os.unlink(pidfname) +- except: +- pass +- f.close() +- except: +- pass +- XENSTORED_TRACE = os.getenv("XENSTORED_TRACE") +- cmd = "xenstored --pid-file /var/run/xenstore.pid" +- if XENSTORED_TRACE: +- cmd += " -T /var/log/xen/xenstored-trace.log" +- s,o = commands.getstatusoutput(cmd) +- +-def start_consoled(): +- XENCONSOLED_TRACE = os.getenv("XENCONSOLED_TRACE") +- args = "" +- if XENCONSOLED_TRACE: +- args += "--log=" + XENCONSOLED_TRACE +- start_daemon("xenconsoled", args) +- +-def start_blktapctrl(): +- start_daemon("blktapctrl", "") +- + def main(): + try: + check_logging() +@@ -121,24 +87,14 @@ + if not sys.argv[1:]: + print ''usage: %s {start|stop|reload|restart}'' % sys.argv[0] + elif sys.argv[1] == ''start'': +- if os.uname()[0] != "SunOS": +- start_xenstored() +- start_consoled() +- start_blktapctrl() + return daemon.start() + elif sys.argv[1] == ''trace_start'': +- start_xenstored() +- start_consoled() +- start_blktapctrl() + return daemon.start(trace=1) + elif sys.argv[1] == ''stop'': + return daemon.stop() + elif sys.argv[1] == ''reload'': + return daemon.reloadConfig() + elif sys.argv[1] == ''restart'': +- start_xenstored() +- start_consoled() +- start_blktapctrl() + return daemon.stop() or daemon.start() + elif sys.argv[1] == ''status'': + return daemon.status()