summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEivind Uggedal <eivind@uggedal.com>2013-11-15 13:19:19 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2013-11-15 13:54:41 +0000
commit853ea856c7e7ecf2b350a862a62c167e7fadd7e5 (patch)
treea09f76e270edfdc8c04947fa8df47627bdd360a8
parente8c99e12ef55bbc4d5a3bbb1d4075fb9d8bb8cae (diff)
downloadalpine-conf-853ea856c7e7ecf2b350a862a62c167e7fadd7e5.zip
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.
-rw-r--r--libalpine.sh.in2
1 files changed, 1 insertions, 1 deletions
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