From e7b1f334ba60209e2fa9d5610f09a6d7c230fe4b Mon Sep 17 00:00:00 2001 From: threeoh6000 Date: Tue, 12 Nov 2024 17:53:59 +0000 Subject: [PATCH] switch to a build process --- .gitignore | 1 + abbiefetch | 216 ------------------------------------- build.sh | 10 ++ display_results.8 | 21 ++++ distro_machine_detection.7 | 69 ++++++++++++ gpu_detection.6 | 10 ++ hostname_username.3 | 9 ++ kernel_info.5 | 6 ++ probing.1 | 37 +++++++ processor_detection.4 | 30 ++++++ system_detection.2 | 27 +++++ 11 files changed, 220 insertions(+), 216 deletions(-) create mode 100644 .gitignore delete mode 100755 abbiefetch create mode 100755 build.sh create mode 100644 display_results.8 create mode 100644 distro_machine_detection.7 create mode 100644 gpu_detection.6 create mode 100644 hostname_username.3 create mode 100644 kernel_info.5 create mode 100644 probing.1 create mode 100644 processor_detection.4 create mode 100644 system_detection.2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..25d2512 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +abbiefetch diff --git a/abbiefetch b/abbiefetch deleted file mode 100755 index a45fda7..0000000 --- a/abbiefetch +++ /dev/null @@ -1,216 +0,0 @@ -#!/bin/sh -system_type="unknown" -subtype="none" -username="(user)" -hostname="(none)" - -hashostname=0 -hasawk=0 -haslspci=0 -hasglxinfo=0 -hassed=0 - -command -v hostname >>/dev/null -if [ "$?" -eq 0 ]; then - hashostname=1 -fi - -command -v awk >>/dev/null -if [ "$?" -eq 0 ]; then - hasawk=1 -fi - -command -v lspci >>/dev/null -if [ "$?" -eq 0 ]; then - haslspci=1 -fi - -command -v glxinfo >>/dev/null -if [ "$?" -eq 0 ]; then - hasglxinfo=1 -fi - -command -v sed >>/dev/null -if [ "$?" -eq 0 ]; then - hassed=1 -fi - - -if [ "$(uname -s)" = "Linux" ] && [ "$system_type" = "unknown" ]; then - system_type="linux" - command -v chumby_version >>/dev/null - if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then - subtype="chumby" - fi - command -v raspi-config >>/dev/null - if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then - subtype="rpi" - fi - command -v pveversion >>/dev/null - if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then - subtype="proxmox" - fi -fi -if [ "$(uname -s)" = "OpenBSD" ] && [ "$system_type" = "unknown" ]; then - system_type="openbsd" -fi -if [ "$(uname -s)" = "FreeBSD" ] && [ "$system_type" = "unknown" ]; then - system_type="freebsd" -fi -if [ "$(uname -s)" = "NetBSD" ] && [ "$system_type" = "unknown" ]; then - system_type="netbsd" -fi -if [ "$(uname -s)" = "Haiku" ] && [ "$system_type" = "unknown" ]; then - system_type="haiku" -fi - -if [ "$hashostname" -eq 1 ]; then - hostname="$(hostname)" -elif [ -n "$(cat /etc/hostname)" ]; then - hostname="$(cat /etc/hostname)" -fi - -if [ -n "$(whoami)" ]; then - username="$(whoami)" -fi - -if [ "$hasawk" -eq 1 ] && [ $system_type = "openbsd" ] && [ -z "$processor" ]; then - processor="$(sysctl hw.model | awk -F "=" '{print $2}')" -fi -if [ "$hasawk" -eq 1 ] && [ $system_type = "freebsd" ] && [ -z "$processor" ]; then - processor="$(sysctl hw.model | awk -F ": " '{print $2}')" -fi -if [ "$hasawk" -eq 1 ] && [ $system_type = "netbsd" ] && [ -z "$processor" ]; then - processor="$(sysctl machdep.cpu_brand | awk -F " = " '{print $2}')" -fi -if [ "$hasawk" -eq 1 ] && [ $system_type = "haiku" ] && [ -z "$processor" ]; then - processor="$(sysinfo | grep "CPU #0" | awk -F "\"" '{ print $2 }')" -fi -if [ "$hasawk" -eq 1 ] && [ $system_type = "linux" ] && [ -z "$processor" ]; then - if [ -n "$(cat /proc/cpuinfo | grep "model name" | head -n 1 | awk -F ": " '{print $2}')" ]; then - processor="$(cat /proc/cpuinfo | grep "model name" | head -n 1 | awk -F ": " '{print $2}')" - elif [ -n "$(cat /proc/cpuinfo | grep -v "cpuid" | grep -v "Hz" | grep -v "cpu number" | grep -v "cpu regs" | grep "cpu" | head -n 1 | awk -F ": " '{print $2}')" ]; then - processor="$(cat /proc/cpuinfo | grep -v "cpuid" | grep -v "Hz" | grep -v "cpu number" | grep -v "cpu regs" | grep "cpu" | head -n 1 | awk -F ": " '{print $2}')" - elif [ -n "$(cat /proc/cpuinfo | grep "Hardware" | head -n 1 | awk -F ": " '{print $2}')" ] && [ $subtype = "chumby" -o $subtype = "rpi" ]; then - processor="$(cat /proc/cpuinfo | grep "Hardware" | head -n 1 | awk -F ": " '{print $2}')" - elif [ -n "$(cat /proc/cpuinfo | grep "family" | head -n 1 | awk -F ": " '{print $2}')" ]; then - processor="$(cat /proc/cpuinfo | grep "family" | head -n 1 | awk -F ": " '{print $2}')" - elif [ -n "$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')" ]; then - processor="$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')" - fi -fi -if [ "$hassed" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -n "$processor" ]; then - if [ -n "$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")" ]; then - processor="$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")" - fi -fi - -if [ -n "$(uname -r)" ] && [ -z "$kernel" ]; then - kernel="$(uname -s) $(uname -r)" -fi -if [ -n "$(uname -s)" ] && [ -z "$kernel" ]; then - kernel="$(uname -s)" -fi - -if [ "$hasglxinfo" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then - if [ -n "$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')" ]; then - graphics="$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')" - fi -fi -if [ "$haslspci" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then - if [ -n "$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')" ]; then - graphics="$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')" - fi -fi - -if [ -f /etc/lsb-release ] && [ $system_type = "linux" ]; then - if [ "$hasawk" -eq 1 ] && [ -z "$distro" ]; then - if [ -n "$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}') $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" ] && [ "$(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" != "rolling" ]; then - distro="$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}') $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" - elif [ -n "$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}')" ]; then - distro="$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}')" - fi - fi -fi -if [ -f /etc/os-release ] && [ $system_type = "linux" ]; then - if [ "$hasawk" -eq 1 ] && [ -z "$distro" ]; then - if [ -n "$(cat /etc/os-release | grep PRETTY_NAME | awk -F "\"" '{print $2}')" ]; then - distro="$(cat /etc/os-release | grep PRETTY_NAME | awk -F "\"" '{print $2}')" - elif [ -n "$(cat /etc/os-release | grep NAME | awk -F "\"" '{print $2}')" ]; then - distro="$(cat /etc/os-release | grep NAME | awk -F "\"" '{print $2}')" - fi - fi -fi -if [ $subtype = "chumby" ]; then - distro="Chumby firmware $(chumby_version -s)" - if [ "$hasawk" -eq 1 ]; then - if [ "$(chumby_version -h | awk -F "." '{print $1}')" = "3" ]; then - machine="Chumby Classic" - elif [ "$(chumby_version -h | awk -F "." '{print $1}')" = "10" ]; then - machine="Chumby One" - elif [ "$(chumby_version -h | awk -F "." '{print $1}')" = "7" ]; then - machine="Insignia Infocast 3.5\"" - else - machine="Chumby-enabled device" - fi - fi -fi -if [ $subtype = "proxmox" ]; then - if [ "$hasawk" -eq 1 ]; then - if [ -n "$(pveversion | awk -F "/" '{ print $2 }')" ]; then - distro="Proxmox VE $(pveversion | awk -F "/" '{ print $2 }')" - fi - fi -fi -if [ $system_type = "openbsd" ]; then - if [ "$hasawk" -eq 1 ]; then - distro="revision $(sysctl kern.osrevision | awk -F "=" '{print $2}')" - machine="$(sysctl hw.vendor | awk -F "=" '{print $2}') $(sysctl hw.product | awk -F "=" '{print $2}')" - fi -fi -if [ $system_type = "freebsd" ]; then - if [ "$hasawk" -eq 1 ]; then - distro="revision $(sysctl kern.osrevision | awk -F ": " '{print $2}')" - fi - machine="$(kenv smbios.system.maker) $(kenv smbios.system.product)" -fi -if [ $system_type = "netbsd" ]; then - if [ "$hasawk" -eq 1 ]; then - distro="revision $(sysctl kern.osrevision | awk -F " = " '{print $2}')" - machine="$(sysctl machdep.dmi.system-vendor | awk -F " = " '{print $2}') $(sysctl machdep.dmi.system-product | awk -F " = " '{print $2}')" - fi -fi -if [ $system_type = "haiku" ]; then - distro="$(uname -v)" -fi - -if [ $system_type = "linux" ] && [ -z "$machine" ]; then - if [ -f "/sys/devices/virtual/dmi/id/product_name" ]; then - machine="$(cat /sys/devices/virtual/dmi/id/product_name)" - fi - if [ -f "/sys/devices/virtual/dmi/id/sys_vendor" ]; then - machine="$(cat /sys/devices/virtual/dmi/id/sys_vendor) $machine" - fi -fi - -if [ "$subtype" = "none" ]; then - echo "$username@$hostname ($system_type)" -else - echo "$username@$hostname ($system_type/$subtype)" -fi -echo -if [ -n "$processor" ]; then - echo "cpu: $processor" -fi -if [ -n "$graphics" ]; then - echo "gpu: $graphics" -fi -if [ -n "$kernel" ]; then - echo "krn: $kernel" -fi -if [ -n "$distro" ]; then - echo "sys: $distro" -fi -if [ -n "$machine" ]; then - echo "mac: $machine" -fi diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..2c0379a --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#!/bin/sh +cat probing.1 | tee -p abbiefetch +cat system_detection.2 | tee -ap abbiefetch +cat hostname_username.3 | tee -ap abbiefetch +cat processor_detection.4 | tee -ap abbiefetch +cat kernel_info.5 | tee -ap abbiefetch +cat gpu_detection.6 | tee -ap abbiefetch +cat distro_machine_detection.7 | tee -ap abbiefetch +cat display_results.8 | tee -ap abbiefetch +chmod +x abbiefetch diff --git a/display_results.8 b/display_results.8 new file mode 100644 index 0000000..92d3775 --- /dev/null +++ b/display_results.8 @@ -0,0 +1,21 @@ +if [ "$subtype" = "none" ]; then + echo "$username@$hostname ($system_type)" +else + echo "$username@$hostname ($system_type/$subtype)" +fi +echo +if [ -n "$processor" ]; then + echo "cpu: $processor" +fi +if [ -n "$graphics" ]; then + echo "gpu: $graphics" +fi +if [ -n "$kernel" ]; then + echo "krn: $kernel" +fi +if [ -n "$distro" ]; then + echo "sys: $distro" +fi +if [ -n "$machine" ]; then + echo "mac: $machine" +fi diff --git a/distro_machine_detection.7 b/distro_machine_detection.7 new file mode 100644 index 0000000..b09850f --- /dev/null +++ b/distro_machine_detection.7 @@ -0,0 +1,69 @@ +if [ -f /etc/lsb-release ] && [ $system_type = "linux" ]; then + if [ "$hasawk" -eq 1 ] && [ -z "$distro" ]; then + if [ -n "$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}') $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" ] && [ "$(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" != "rolling" ]; then + distro="$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}') $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" + elif [ -n "$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}')" ]; then + distro="$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}')" + fi + fi +fi +if [ -f /etc/os-release ] && [ $system_type = "linux" ]; then + if [ "$hasawk" -eq 1 ] && [ -z "$distro" ]; then + if [ -n "$(cat /etc/os-release | grep PRETTY_NAME | awk -F "\"" '{print $2}')" ]; then + distro="$(cat /etc/os-release | grep PRETTY_NAME | awk -F "\"" '{print $2}')" + elif [ -n "$(cat /etc/os-release | grep NAME | awk -F "\"" '{print $2}')" ]; then + distro="$(cat /etc/os-release | grep NAME | awk -F "\"" '{print $2}')" + fi + fi +fi +if [ $subtype = "chumby" ]; then + distro="Chumby firmware $(chumby_version -s)" + if [ "$hasawk" -eq 1 ]; then + if [ "$(chumby_version -h | awk -F "." '{print $1}')" = "3" ]; then + machine="Chumby Classic" + elif [ "$(chumby_version -h | awk -F "." '{print $1}')" = "10" ]; then + machine="Chumby One" + elif [ "$(chumby_version -h | awk -F "." '{print $1}')" = "7" ]; then + machine="Insignia Infocast 3.5\"" + else + machine="Chumby-enabled device" + fi + fi +fi +if [ $subtype = "proxmox" ]; then + if [ "$hasawk" -eq 1 ]; then + if [ -n "$(pveversion | awk -F "/" '{ print $2 }')" ]; then + distro="Proxmox VE $(pveversion | awk -F "/" '{ print $2 }')" + fi + fi +fi +if [ $system_type = "openbsd" ]; then + if [ "$hasawk" -eq 1 ]; then + distro="revision $(sysctl kern.osrevision | awk -F "=" '{print $2}')" + machine="$(sysctl hw.vendor | awk -F "=" '{print $2}') $(sysctl hw.product | awk -F "=" '{print $2}')" + fi +fi +if [ $system_type = "freebsd" ]; then + if [ "$hasawk" -eq 1 ]; then + distro="revision $(sysctl kern.osrevision | awk -F ": " '{print $2}')" + fi + machine="$(kenv smbios.system.maker) $(kenv smbios.system.product)" +fi +if [ $system_type = "netbsd" ]; then + if [ "$hasawk" -eq 1 ]; then + distro="revision $(sysctl kern.osrevision | awk -F " = " '{print $2}')" + machine="$(sysctl machdep.dmi.system-vendor | awk -F " = " '{print $2}') $(sysctl machdep.dmi.system-product | awk -F " = " '{print $2}')" + fi +fi +if [ $system_type = "haiku" ]; then + distro="$(uname -v)" +fi + +if [ $system_type = "linux" ] && [ -z "$machine" ]; then + if [ -f "/sys/devices/virtual/dmi/id/product_name" ]; then + machine="$(cat /sys/devices/virtual/dmi/id/product_name)" + fi + if [ -f "/sys/devices/virtual/dmi/id/sys_vendor" ]; then + machine="$(cat /sys/devices/virtual/dmi/id/sys_vendor) $machine" + fi +fi diff --git a/gpu_detection.6 b/gpu_detection.6 new file mode 100644 index 0000000..cb70416 --- /dev/null +++ b/gpu_detection.6 @@ -0,0 +1,10 @@ +if [ "$hasglxinfo" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then + if [ -n "$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')" ]; then + graphics="$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')" + fi +fi +if [ "$haslspci" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then + if [ -n "$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')" ]; then + graphics="$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')" + fi +fi diff --git a/hostname_username.3 b/hostname_username.3 new file mode 100644 index 0000000..e629b65 --- /dev/null +++ b/hostname_username.3 @@ -0,0 +1,9 @@ +if [ "$hashostname" -eq 1 ]; then + hostname="$(hostname)" +elif [ -n "$(cat /etc/hostname)" ]; then + hostname="$(cat /etc/hostname)" +fi + +if [ -n "$(whoami)" ]; then + username="$(whoami)" +fi diff --git a/kernel_info.5 b/kernel_info.5 new file mode 100644 index 0000000..7cc9731 --- /dev/null +++ b/kernel_info.5 @@ -0,0 +1,6 @@ +if [ -n "$(uname -r)" ] && [ -z "$kernel" ]; then + kernel="$(uname -s) $(uname -r)" +fi +if [ -n "$(uname -s)" ] && [ -z "$kernel" ]; then + kernel="$(uname -s)" +fi diff --git a/probing.1 b/probing.1 new file mode 100644 index 0000000..04f9a9f --- /dev/null +++ b/probing.1 @@ -0,0 +1,37 @@ +#!/bin/sh +system_type="unknown" +subtype="none" +username="(user)" +hostname="(none)" + +hashostname=0 +hasawk=0 +haslspci=0 +hasglxinfo=0 +hassed=0 + +command -v hostname >>/dev/null +if [ "$?" -eq 0 ]; then + hashostname=1 +fi + +command -v awk >>/dev/null +if [ "$?" -eq 0 ]; then + hasawk=1 +fi + +command -v lspci >>/dev/null +if [ "$?" -eq 0 ]; then + haslspci=1 +fi + +command -v glxinfo >>/dev/null +if [ "$?" -eq 0 ]; then + hasglxinfo=1 +fi + +command -v sed >>/dev/null +if [ "$?" -eq 0 ]; then + hassed=1 +fi + diff --git a/processor_detection.4 b/processor_detection.4 new file mode 100644 index 0000000..88f8192 --- /dev/null +++ b/processor_detection.4 @@ -0,0 +1,30 @@ +if [ "$hasawk" -eq 1 ] && [ $system_type = "openbsd" ] && [ -z "$processor" ]; then + processor="$(sysctl hw.model | awk -F "=" '{print $2}')" +fi +if [ "$hasawk" -eq 1 ] && [ $system_type = "freebsd" ] && [ -z "$processor" ]; then + processor="$(sysctl hw.model | awk -F ": " '{print $2}')" +fi +if [ "$hasawk" -eq 1 ] && [ $system_type = "netbsd" ] && [ -z "$processor" ]; then + processor="$(sysctl machdep.cpu_brand | awk -F " = " '{print $2}')" +fi +if [ "$hasawk" -eq 1 ] && [ $system_type = "haiku" ] && [ -z "$processor" ]; then + processor="$(sysinfo | grep "CPU #0" | awk -F "\"" '{ print $2 }')" +fi +if [ "$hasawk" -eq 1 ] && [ $system_type = "linux" ] && [ -z "$processor" ]; then + if [ -n "$(cat /proc/cpuinfo | grep "model name" | head -n 1 | awk -F ": " '{print $2}')" ]; then + processor="$(cat /proc/cpuinfo | grep "model name" | head -n 1 | awk -F ": " '{print $2}')" + elif [ -n "$(cat /proc/cpuinfo | grep -v "cpuid" | grep -v "Hz" | grep -v "cpu number" | grep -v "cpu regs" | grep "cpu" | head -n 1 | awk -F ": " '{print $2}')" ]; then + processor="$(cat /proc/cpuinfo | grep -v "cpuid" | grep -v "Hz" | grep -v "cpu number" | grep -v "cpu regs" | grep "cpu" | head -n 1 | awk -F ": " '{print $2}')" + elif [ -n "$(cat /proc/cpuinfo | grep "Hardware" | head -n 1 | awk -F ": " '{print $2}')" ] && [ $subtype = "chumby" -o $subtype = "rpi" ]; then + processor="$(cat /proc/cpuinfo | grep "Hardware" | head -n 1 | awk -F ": " '{print $2}')" + elif [ -n "$(cat /proc/cpuinfo | grep "family" | head -n 1 | awk -F ": " '{print $2}')" ]; then + processor="$(cat /proc/cpuinfo | grep "family" | head -n 1 | awk -F ": " '{print $2}')" + elif [ -n "$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')" ]; then + processor="$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')" + fi +fi +if [ "$hassed" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -n "$processor" ]; then + if [ -n "$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")" ]; then + processor="$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")" + fi +fi diff --git a/system_detection.2 b/system_detection.2 new file mode 100644 index 0000000..71a63a1 --- /dev/null +++ b/system_detection.2 @@ -0,0 +1,27 @@ +if [ "$(uname -s)" = "Linux" ] && [ "$system_type" = "unknown" ]; then + system_type="linux" + command -v chumby_version >>/dev/null + if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then + subtype="chumby" + fi + command -v raspi-config >>/dev/null + if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then + subtype="rpi" + fi + command -v pveversion >>/dev/null + if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then + subtype="proxmox" + fi +fi +if [ "$(uname -s)" = "OpenBSD" ] && [ "$system_type" = "unknown" ]; then + system_type="openbsd" +fi +if [ "$(uname -s)" = "FreeBSD" ] && [ "$system_type" = "unknown" ]; then + system_type="freebsd" +fi +if [ "$(uname -s)" = "NetBSD" ] && [ "$system_type" = "unknown" ]; then + system_type="netbsd" +fi +if [ "$(uname -s)" = "Haiku" ] && [ "$system_type" = "unknown" ]; then + system_type="haiku" +fi