compatibility with ARM devices running FreeBSD

From PR #325 by @tntc .
Untested on DragonflyBSD and therefor not applied for it too.
This commit is contained in:
darealshinji
2016-05-06 15:49:42 +02:00
parent eb1d3ede23
commit be80912e50

View File

@@ -1031,7 +1031,9 @@ detectcpu () {
else
cpu="Unknown"
fi
elif [[ "$distro" == "FreeBSD" || "$distro" == "DragonflyBSD" ]]; then
elif [ "$distro" == "FreeBSD" ]; then
cpu=$(dmesg | grep 'CPU:' | head -n 1 | sed -r 's/CPU: //' | sed -e 's/([^()]*)//g')
elif [ "$distro" == "DragonflyBSD" ]; then
cpu=$(sysctl -n hw.model)
elif [ "$distro" == "OpenBSD" ]; then
cpu=$(sysctl -n hw.model | sed 's/@.*//')