summary refs log tree commit diff
path: root/pkgs/applications/virtualization/xen
diff options
context:
space:
mode:
authorMichał Pałka <michal.palka@chalmers.se>2017-04-27 07:55:34 +0000
committerMichał Pałka <michal.palka@chalmers.se>2017-04-27 07:55:34 +0000
commit7c918ff7d47f5cadfb3946745a876f6f4778060d (patch)
tree1362a0f5dd564aa32da1bb43daa9ce447658188b /pkgs/applications/virtualization/xen
parenta89a091b20fdfbf3abc86dbce82e6a1f524df106 (diff)
downloadnixpkgs-7c918ff7d47f5cadfb3946745a876f6f4778060d.tar
nixpkgs-7c918ff7d47f5cadfb3946745a876f6f4778060d.tar.gz
nixpkgs-7c918ff7d47f5cadfb3946745a876f6f4778060d.tar.bz2
nixpkgs-7c918ff7d47f5cadfb3946745a876f6f4778060d.tar.lz
nixpkgs-7c918ff7d47f5cadfb3946745a876f6f4778060d.tar.xz
nixpkgs-7c918ff7d47f5cadfb3946745a876f6f4778060d.tar.zst
nixpkgs-7c918ff7d47f5cadfb3946745a876f6f4778060d.zip
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
Diffstat (limited to 'pkgs/applications/virtualization/xen')
-rw-r--r--pkgs/applications/virtualization/xen/generic.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/applications/virtualization/xen/generic.nix b/pkgs/applications/virtualization/xen/generic.nix
index 953368b7e3b..bfce2cd6ae4 100644
--- a/pkgs/applications/virtualization/xen/generic.nix
+++ b/pkgs/applications/virtualization/xen/generic.nix
@@ -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" ]