You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
534 B
23 lines
534 B
#!/bin/dash
|
|
|
|
. ./utils.sh
|
|
|
|
##
|
|
# start guessing the system type via uname and export it.
|
|
#
|
|
gather_host_info() {
|
|
[ -z "${OS}" ] || return
|
|
|
|
OS="$(${UNAME} -o)"
|
|
KERNEL="$(${UNAME} -s)"
|
|
VERSION="$(${UNAME} -r)"
|
|
PLATFORM="$(${UNAME} -m)"
|
|
HOSTNAME="$(${UNAME} -n)"
|
|
GNU="$([ "${OS%GNU*}" != ${OS} ] && echo "GNU")"
|
|
CLASSES="${OS}\n${GNU}\n${KERNEL}\n${VERSION}\n${PLATFORM}\n${HOSTNAME}"
|
|
CLASSES="$(${ECHO} -e "${CLASSES}" | ${SORT} -u | ${TR} "\n" " ")"
|
|
|
|
export OS KERNEL VERSION PLATFORM HOSTNAME CLASSES
|
|
}
|
|
|
|
# vim: set ts=4 sw=4:
|