openbsd: Show host correctly

This commit is contained in:
Dylan Araps 2020-03-12 12:36:13 +02:00
parent 6ce6b1a0f7
commit c8aca296c1
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

6
pfetch
View File

@ -274,7 +274,7 @@ get_os() {
IFS='(' read -r distro _ < /etc/release IFS='(' read -r distro _ < /etc/release
;; ;;
OpenBSD) OpenBSD*)
# Show the OpenBSD version type (current if present). # Show the OpenBSD version type (current if present).
# kern.version=OpenBSD 6.6-current (GENERIC.MP) ... # kern.version=OpenBSD 6.6-current (GENERIC.MP) ...
IFS=' =' read -r _ distro openbsd_ver _ <<-EOF IFS=' =' read -r _ distro openbsd_ver _ <<-EOF
@ -327,6 +327,10 @@ get_host() {
machdep.dmi.system-product) machdep.dmi.system-product)
;; ;;
OpenBSD*)
host=$(sysctl -n hw.version)
;;
*BSD*|Minix) *BSD*|Minix)
host=$(sysctl -n hw.vendor hw.product) host=$(sysctl -n hw.vendor hw.product)
;; ;;