aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub
diff options
context:
space:
mode:
authorkaf24@localhost.localdomain <kaf24@localhost.localdomain>2006-12-09 15:04:27 +0000
committerkaf24@localhost.localdomain <kaf24@localhost.localdomain>2006-12-09 15:04:27 +0000
commit5334214febf69d7e84642539543ef5277789cead (patch)
tree431f66eb9370af3c320c3c0f7f72fd8c8bd01941 /tools/pygrub
parent74d9fdb1471770e4a59e0af34802b9a56eb98d56 (diff)
downloadxen-5334214febf69d7e84642539543ef5277789cead.tar.gz
xen-5334214febf69d7e84642539543ef5277789cead.tar.bz2
xen-5334214febf69d7e84642539543ef5277789cead.zip
pygrub tmp files should live in /var/run/ not /var/lib/, as they are
indeed runtime only. Also fix a race condition in making the pygrub fifo. Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/pygrub')
-rw-r--r--tools/pygrub/Makefile4
-rw-r--r--tools/pygrub/src/pygrub6
2 files changed, 6 insertions, 4 deletions
diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index da75bda4b0..2e7b3e4d21 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -12,11 +12,11 @@ build:
ifndef XEN_PYTHON_NATIVE_INSTALL
install: all
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix=""
- $(INSTALL_DIR) -p $(DESTDIR)/var/lib/xen
+ $(INSTALL_DIR) -p $(DESTDIR)/var/run/xend/boot
else
install: all
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
- $(INSTALL_DIR) -p $(DESTDIR)/var/lib/xen
+ $(INSTALL_DIR) -p $(DESTDIR)/var/run/xend/boot
endif
.PHONY: clean
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index 64a3662704..8fb43ca680 100644
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -514,14 +514,16 @@ if __name__ == "__main__":
fs = fsimage.open(file, offset)
kernel = fs.open_file(img.kernel[1],).read()
- (tfd, fn) = tempfile.mkstemp(prefix="vmlinuz.", dir="/var/lib/xen")
+ (tfd, fn) = tempfile.mkstemp(prefix="boot_kernel.",
+ dir="/var/run/xend/boot")
os.write(tfd, kernel)
os.close(tfd)
sxp = "linux (kernel %s)" %(fn,)
if img.initrd:
initrd = fs.open_file(img.initrd[1],).read()
- (tfd, fn) = tempfile.mkstemp(prefix="initrd.", dir="/var/lib/xen")
+ (tfd, fn) = tempfile.mkstemp(prefix="boot_ramdisk.",
+ dir="/var/run/xend/boot")
os.write(tfd, initrd)
os.close(tfd)
sxp += "(ramdisk %s)" %(fn,)