summaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-Let-is_xen_dom0-fail-silently.patch
blob: 348b2b51799acce569bc2e877d4b48564cda959c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 853ea856c7e7ecf2b350a862a62c167e7fadd7e5 Mon Sep 17 00:00:00 2001
From: Eivind Uggedal <eivind@uggedal.com>
Date: Fri, 15 Nov 2013 13:19:19 +0100
Subject: [PATCH] Let is_xen_dom0 fail silently

/proc/xen/capabilities can be non-existent while /proc/xen
exists.

This behaviour was seen when booting in rescue mode on
Linode.
---
 libalpine.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libalpine.sh.in b/libalpine.sh.in
index a03deb3..7aec815 100644
--- a/libalpine.sh.in
+++ b/libalpine.sh.in
@@ -89,7 +89,7 @@ is_xen() {
 # Detect if we are running Xen Dom0
 is_xen_dom0() {
 	is_xen && \
-	grep -q "control_d" /proc/xen/capabilities
+	grep -q "control_d" /proc/xen/capabilities 2>/dev/null
 }
 
 # list of available network interfaces that aren't part of any bridge or bond
-- 
1.8.4.3