about summary refs log tree commit diff
path: root/xuname
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-09-30 18:31:45 +0200
committerLeah Neukirchen <leah@vuxu.org>2019-09-30 18:31:45 +0200
commitea8a6996905aac9aa171d86b3e94ea094b7669d1 (patch)
treec0ba6e948d0f8849df2d4d90565de697cc7272b5 /xuname
parentfaf06f17f427f5dbc239fb3d2114f19d70c693d3 (diff)
downloadxtools-ea8a6996905aac9aa171d86b3e94ea094b7669d1.tar.gz
xtools-ea8a6996905aac9aa171d86b3e94ea094b7669d1.tar.xz
xtools-ea8a6996905aac9aa171d86b3e94ea094b7669d1.zip
xuname: add rootless hypervisor detection as fallback
Diffstat (limited to 'xuname')
-rwxr-xr-xxuname1
1 files changed, 1 insertions, 0 deletions
diff --git a/xuname b/xuname
index 8dbcf17..7c63755 100755
--- a/xuname
+++ b/xuname
@@ -7,6 +7,7 @@ MACH=$(xbps-uhelper arch)
 OUTDATED=$(xbps-install -Mun)
 HOLD=$(xbps-query -H)
 VM=$(dmesg 2>/dev/null | awk '/Hypervisor detected/{print $NF}')
+[ -z "$VM" ] && grep -q hypervisor /proc/cpuinfo && VM=VM
 CPU=$(cat /proc/cpuinfo |awk '/^vendor_id/{print $NF;exit}')
 [ -z "$CPU" ] && CPU=$(cat /proc/cpuinfo |awk '/^platform/{print $NF;exit}')
 REPO=$(xbps-query --regex -p repository -s '.' | cut -d/ -f2- | sort -u | awk '