mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[SOLARIS] Xen daemons are managed separately, so we need a way to start
just xend, and we need to disable xend's self-restarter. Signed-off-by: John Levon <john.levon@sun.com>
This commit is contained in:
1 parent
1943191f67
commit
22241b17fe
3 files changed
+25
-5
No files matched your search
@@ -24,4 +24,13 @@ _scripts_dir = {
|
||||
"SunOS": "/usr/lib/xen/scripts",
|
||||
}
|
||||
|
||||
scripts_dir = _scripts_dir.get(os.uname()[0], "/etc/xen/scripts")
|
||||
_xend_autorestart = {
|
||||
"Linux": True,
|
||||
"SunOS": False,
|
||||
}
|
||||
|
||||
def _get(var, default=None):
|
||||
return var.get(os.uname()[0], default)
|
||||
|
||||
scripts_dir = _get(_scripts_dir, "/etc/xen/scripts")
|
||||
xend_autorestart = _get(_xend_autorestart)
|
||||
@@ -17,6 +17,7 @@ import traceback
|
||||
import xen.lowlevel.xc
|
||||
|
||||
from xen.xend.XendLogging import log
|
||||
from xen.xend import osdep
|
||||
|
||||
import relocate
|
||||
import SrvServer
|
||||
@@ -168,8 +169,14 @@ class Daemon:
|
||||
# ready to receive requests. All subsequent restarts we don't
|
||||
# want this behaviour, or the pipe will eventually fill up, so
|
||||
# we just pass None into run in subsequent cases (by clearing w
|
||||
# in the parent of the first fork).
|
||||
# in the parent of the first fork). On some operating systems,
|
||||
# restart is managed externally, so we won't fork, and just exit.
|
||||
while True:
|
||||
|
||||
if not osdep.xend_autorestart:
|
||||
self.run(os.fdopen(w, 'w'))
|
||||
break
|
||||
|
||||
pid = self.fork_pid()
|
||||
if pid:
|
||||
if w is not None:
|
||||
|
||||