aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2020-03-12 12:36:13 +0200
committerDylan Araps <dylan.araps@gmail.com>2020-03-12 12:36:13 +0200
commitc8aca296c1dfcb38846525f08eb6668a3daf7b1c (patch)
tree53e56af220eb9cc0b1e494b9d319b2909a8ba1ba
parent6ce6b1a0f7e438faf4a8578fde201630dea8926a (diff)
downloadpfetch-c8aca296c1dfcb38846525f08eb6668a3daf7b1c.tar.gz
openbsd: Show host correctly
-rwxr-xr-xpfetch6
1 files changed, 5 insertions, 1 deletions
diff --git a/pfetch b/pfetch
index edfda88..04d27a0 100755
--- a/pfetch
+++ b/pfetch
@@ -274,7 +274,7 @@ get_os() {
IFS='(' read -r distro _ < /etc/release
;;
- OpenBSD)
+ OpenBSD*)
# Show the OpenBSD version type (current if present).
# kern.version=OpenBSD 6.6-current (GENERIC.MP) ...
IFS=' =' read -r _ distro openbsd_ver _ <<-EOF
@@ -327,6 +327,10 @@ get_host() {
machdep.dmi.system-product)
;;
+ OpenBSD*)
+ host=$(sysctl -n hw.version)
+ ;;
+
*BSD*|Minix)
host=$(sysctl -n hw.vendor hw.product)
;;