[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xend: Make /var/lib/xen if not already present.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1236080251 0 # Node ID bb281d11fa99191a9528fb18734dcddc4fe04bf4 # Parent 310c85c9cb860bc0933caa426097d788f99dbb6e xend: Make /var/lib/xen if not already present. Signed-off-by: Christoph Egger <christoph.egger@xxxxxxx> --- tools/python/xen/xend/XendCheckpoint.py | 14 ++++++++++++++ 1 files changed, 14 insertions(+) diff -r 310c85c9cb86 -r bb281d11fa99 tools/python/xen/xend/XendCheckpoint.py --- a/tools/python/xen/xend/XendCheckpoint.py Mon Mar 02 16:24:50 2009 +0000 +++ b/tools/python/xen/xend/XendCheckpoint.py Tue Mar 03 11:37:31 2009 +0000 @@ -66,6 +66,13 @@ def insert_after(list, pred, value): def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1): + try: + if not os.path.isdir("/var/lib/xen"): + os.makedirs("/var/lib/xen") + except Exception, exn: + log.exception("Can't create directory '/var/lib/xen'") + raise XendError("Can't create directory '/var/lib/xen'") + write_exact(fd, SIGNATURE, "could not write guest state file: signature") sxprep = dominfo.sxpr() @@ -166,6 +173,13 @@ def save(fd, dominfo, network, live, dst def restore(xd, fd, dominfo = None, paused = False, relocating = False): + try: + if not os.path.isdir("/var/lib/xen"): + os.makedirs("/var/lib/xen") + except Exception, exn: + log.exception("Can't create directory '/var/lib/xen'") + raise XendError("Can't create directory '/var/lib/xen'") + signature = read_exact(fd, len(SIGNATURE), "not a valid guest state file: signature read") if signature != SIGNATURE: _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |