summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2012-09-05 10:29:49 -0700
committerJohn Southworth <john.southworth@vyatta.com>2012-09-05 10:29:49 -0700
commitd1ba15fef305aec72997b3b09f463fe7aace7215 (patch)
treed0f4a060eb10be56a6c0403df75f08d92a605e41
parented3b27a61123f5e529b5ab0786bdd7b884c30c11 (diff)
downloadinitramfs-tools-d1ba15fef305aec72997b3b09f463fe7aace7215.tar.gz
initramfs-tools-d1ba15fef305aec72997b3b09f463fe7aace7215.zip
Better way to load xen modules, adapted from ubuntu's hw-detect package
-rwxr-xr-xscripts/init-top/xen10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/init-top/xen b/scripts/init-top/xen
new file mode 100755
index 0000000..d403247
--- /dev/null
+++ b/scripts/init-top/xen
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+. /scripts/functions
+
+if [ "$(cat /sys/hypervisor/type 2>/dev/null || true)" = xen ] && \
+ [ ! -d /sys/bus/xen ]; then
+ log_begin_msg "Detected Xen hypervisor, loading xenbus_probe_frontend"
+ modprobe -q xenbus_probe_frontend
+ log_end_msg
+fi