Merge pull request #4126 from lightswitch05/feature/support-and-test-debian-bullseye

Support and test Debian Bullsye (11) and Ubuntu 21.04
This commit is contained in:
Adam Warner 2021-07-15 19:11:26 +01:00 committed by GitHub
commit 3b6e6317b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 68 additions and 8 deletions

View file

@ -410,12 +410,12 @@ os_check() {
# This function gets a list of supported OS versions from a TXT record at versions.pi-hole.net
# and determines whether or not the script is running on one of those systems
local remote_os_domain valid_os valid_version detected_os detected_version cmdResult digReturnCode response
remote_os_domain="versions.pi-hole.net"
remote_os_domain=${OS_CHECK_DOMAIN_NAME:-"versions.pi-hole.net"}
detected_os=$(grep "\bID\b" /etc/os-release | cut -d '=' -f2 | tr -d '"')
detected_version=$(grep VERSION_ID /etc/os-release | cut -d '=' -f2 | tr -d '"')
cmdResult="$(dig +short -t txt ${remote_os_domain} @ns1.pi-hole.net 2>&1; echo $?)"
cmdResult="$(dig +short -t txt "${remote_os_domain}" @ns1.pi-hole.net 2>&1; echo $?)"
#Get the return code of the previous command (last line)
digReturnCode="${cmdResult##*$'\n'}"