about summary refs log tree commit diff
path: root/xuname
diff options
context:
space:
mode:
Diffstat (limited to 'xuname')
-rwxr-xr-xxuname3
1 files changed, 2 insertions, 1 deletions
diff --git a/xuname b/xuname
index 8e06da4..8dbcf17 100755
--- a/xuname
+++ b/xuname
@@ -8,6 +8,7 @@ OUTDATED=$(xbps-install -Mun)
 HOLD=$(xbps-query -H)
 VM=$(dmesg 2>/dev/null | awk '/Hypervisor detected/{print $NF}')
 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 '
 	/^\/alpha.de.repo.voidlinux.org\/current\/multilib/ {m=m"m"}
 	/^\/alpha.de.repo.voidlinux.org\/current\/debug/ {d=d"d"}
@@ -19,4 +20,4 @@ REPO=$(xbps-query --regex -p repository -s '.' | cut -d/ -f2- | sort -u | awk '
 ')
 
 printf '%s %s %s %s %s%s %s\n' \
-	"$OS" "$KVER" "$MACH" "$CPU${VM:+/$VM}" "${OUTDATED:+not}uptodate" "${HOLD:+ hold}" "$REPO"
+	"$OS" "$KVER" "$MACH" "${CPU:-Unknown}${VM:+/$VM}" "${OUTDATED:+not}uptodate" "${HOLD:+ hold}" "$REPO"