Unverified Commit 1778941d authored by dylan's avatar dylan Committed by GitHub

Merge pull request #1426 from mitchweaver/detect_current

detect whether using -current on OpenBSD
parents 5241b24b 07a9bcdd
...@@ -1032,6 +1032,11 @@ get_distro() { ...@@ -1032,6 +1032,11 @@ get_distro() {
*) distro="Guix System $(guix system -V | awk 'NR==1{printf $5}')" *) distro="Guix System $(guix system -V | awk 'NR==1{printf $5}')"
esac esac
# Display whether using '-current' or '-release' on OpenBSD.
elif [[ $kernel_name = OpenBSD ]] ; then
read -ra kernel_info <<< "$(sysctl -n kern.version)"
distro=${kernel_info[*]:0:2}
else else
for release_file in /etc/*-release; do for release_file in /etc/*-release; do
distro+=$(< "$release_file") distro+=$(< "$release_file")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment