virtualisation-xen: Fix xendomains startup

* Revert to using bash, not sh for the xendomains script to avoid syntax error
* Rewrite /bin/ls to ls in the xendomains script
This commit is contained in:
Michał Pałka 2017-04-27 07:55:34 +00:00
parent a89a091b20
commit 7c918ff7d4

View File

@ -107,7 +107,8 @@ stdenv.mkDerivation (rec {
# We want to do this before getting prefetched stuff to speed things up
# (prefetched stuff has lots of files)
find . -type f | xargs sed -i 's@/usr/bin/\(python\|perl\)@/usr/bin/env \1@g'
find . -type f | xargs sed -i 's@/bin/bash@/bin/sh@g'
find . -type f -not -path "./tools/hotplug/Linux/xendomains.in" \
| xargs sed -i 's@/bin/bash@/bin/sh@g'
# Get prefetched stuff
${withXenfiles (name: x: ''
@ -171,6 +172,11 @@ stdenv.mkDerivation (rec {
${config.postPatch or ""}
'';
postConfigure = ''
substituteInPlace tools/hotplug/Linux/xendomains \
--replace /bin/ls ls
'';
# TODO: Flask needs more testing before enabling it by default.
#makeFlags = "XSM_ENABLE=y FLASK_ENABLE=y PREFIX=$(out) CONFIG_DIR=/etc XEN_EXTFILES_URL=\\$(XEN_ROOT)/xen_ext_files ";
makeFlags = [ "PREFIX=$(out) CONFIG_DIR=/etc" "XEN_SCRIPT_DIR=/etc/xen/scripts" ]