aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-08-25 14:57:45 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-08-25 14:57:45 +0100
commit6c6b085beced4251777c753389dedeacdeced75e (patch)
tree1cf3677433e3be85f5cc868b2f31aeec0248d39d /tools/pygrub
parent1b14383998f80e4108167ef224a402a28e13f5bd (diff)
downloadxen-6c6b085beced4251777c753389dedeacdeced75e.tar.gz
xen-6c6b085beced4251777c753389dedeacdeced75e.tar.bz2
xen-6c6b085beced4251777c753389dedeacdeced75e.zip
pygrub: Set path in #! line of pygrub, too
pygrub currently has a hardcoded path of /usr/bin/python which is not correct if the version of python at install time is not the same as that at build time. This patch uses the existing install-wrap and python/get-path machinery. (It does not address the currently-existing bug that the get-path machinery works by assuming that `python' is a symlink, rather than querying the python interpreter for its version.) Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/pygrub')
-rw-r--r--tools/pygrub/Makefile1
-rw-r--r--tools/pygrub/src/pygrub2
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index b8b64a7794..49abed06d1 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -12,6 +12,7 @@ build:
install: all
CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(BINDIR)/pygrub
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
.PHONY: clean
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index f386e23036..dd35a18536 100644
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#! /usr/bin/env python
#
# pygrub - simple python-based bootloader for Xen
#