aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2010-02-26 09:34:43 +0000
committerRoy Marples <roy@marples.name>2010-02-26 09:34:43 +0000
commit59b08643f1eb833ff54b62af782d5e72d83d61b4 (patch)
treeaba2b2430980e2b590af72e50a092daa0e1e876e /sh
parent5c52e5beb588d87b1e267d0485b56a2609b5481f (diff)
Mount xenfs early so OpenRC can detect it.
Diffstat (limited to 'sh')
-rw-r--r--sh/init.sh.Linux.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in
index d3a4715b..f4f69737 100644
--- a/sh/init.sh.Linux.in
+++ b/sh/init.sh.Linux.in
@@ -70,4 +70,14 @@ if $mountproc; then
eend $?
fi
+# Try to mount xenfs as early as possible, otherwise rc_sys() will always
+# return RC_SYS_XENU and will think that we are in a domU while it's not.
+if grep -Eq "[[:space:]]+xenfs$" /proc/filesystems; then
+ ebegin "Mounting xenfs"
+ if ! fstabinfo --mount /proc/xen; then
+ mount -n -t xenfs xenfs /proc/xen -o nosuid,nodev,noexec
+ fi
+ eend $?
+fi
+
. "$RC_LIBEXECDIR"/sh/init-common-post.sh