2015-03-01 09:57:58 +05:00
|
|
|
# This file includes some variables that vital to all parts of
|
|
|
|
|
# this configuration.
|
|
|
|
|
|
|
|
|
|
OS=`uname`
|
2015-03-21 20:30:55 +05:00
|
|
|
OS_RELEASE=`uname -r`
|
2021-08-22 15:34:20 +05:00
|
|
|
OS_ARCH=`uname -m`
|
2015-03-21 20:30:55 +05:00
|
|
|
|
2021-04-03 17:01:19 +05:00
|
|
|
# Distro detection.
|
2026-06-19 16:12:01 +05:00
|
|
|
if [[ -f /etc/os-release ]]; then
|
|
|
|
|
. /etc/os-release
|
|
|
|
|
DISTRO=${ID}
|
2021-04-03 17:01:19 +05:00
|
|
|
else
|
|
|
|
|
# BSDs OS and macOS can be detected via uname.
|
|
|
|
|
DISTRO=${OS}
|
|
|
|
|
fi
|
|
|
|
|
|
2015-03-21 20:30:55 +05:00
|
|
|
# Variable forcers.
|
|
|
|
|
|
|
|
|
|
# If DEBUG isn't defined - force it to be 0.
|
|
|
|
|
if [ -z ${DEBUG} ]; then
|
|
|
|
|
DEBUG=0
|
|
|
|
|
return 1
|
|
|
|
|
fi
|