mirror of
https://github.com/dylanaraps/pfetch.git
synced 2026-11-14 19:03:03 +00:00
netbsd: host information
This commit is contained in:
1 parent
4e5bbb3944
commit
3bc621579a
1 file changed
+16
@@ -216,6 +216,22 @@ get_host() {
|
||||
host=$(sysctl -n hw.model)
|
||||
;;
|
||||
|
||||
NetBSD*)
|
||||
# Use 'set --' to store the output of the command
|
||||
# as it normalizes whitespace and strips newlines.
|
||||
#
|
||||
# Disable the shellcheck warning for word-splitting
|
||||
# as it's safe and intended ('set -f' disables globbing).
|
||||
# shellcheck disable=2046
|
||||
{
|
||||
set -f
|
||||
set +f -- $(sysctl -n machdep.dmi.system-vendor \
|
||||
machdep.dmi.system-product)
|
||||
}
|
||||
|
||||
host=$*
|
||||
;;
|
||||
|
||||
*BSD*)
|
||||
# Use 'set --' to store the output of the command
|
||||
# as it normalizes whitespace and strips newlines.
|
||||
|
||||
Reference in new issue
Block a user