diff options
Diffstat (limited to 'libalpine.sh.in')
-rwxr-xr-x | libalpine.sh.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libalpine.sh.in b/libalpine.sh.in index 36d2a93..8661643 100755 --- a/libalpine.sh.in +++ b/libalpine.sh.in @@ -106,4 +106,13 @@ askpassword() { IFS=$_oifs } +# Detect if we are running Xen +is_xen() { + test -d /proc/xen +} +# Detect if we are running Xen Dom0 +is_xen_dom0() { + is_xen && \ + grep -q "control_d" /proc/xen/capabilities +} |