mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Same change as 03a8cff
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
acf2879057
commit
9844a3288f
1 changed files with 2 additions and 2 deletions
|
@ -187,7 +187,7 @@ os_check() {
|
||||||
detected_os="${detected_os_pretty%% *}"
|
detected_os="${detected_os_pretty%% *}"
|
||||||
detected_version=$(cat /etc/*release | grep VERSION_ID | cut -d '=' -f2- | tr -d '"')
|
detected_version=$(cat /etc/*release | grep VERSION_ID | cut -d '=' -f2- | tr -d '"')
|
||||||
|
|
||||||
mapfile -t supportedOS < <(dig +short -t txt ${remote_os_domain} | tr -d '"' | tr ' ' '\n')
|
IFS=" "; read -r -a supportedOS < <(dig +short -t txt ${remote_os_domain} | tr -d '"')
|
||||||
|
|
||||||
for i in "${supportedOS[@]}"
|
for i in "${supportedOS[@]}"
|
||||||
do
|
do
|
||||||
|
@ -196,7 +196,7 @@ os_check() {
|
||||||
|
|
||||||
if [[ "${detected_os}" =~ ${os_part} ]]; then
|
if [[ "${detected_os}" =~ ${os_part} ]]; then
|
||||||
valid_os=true
|
valid_os=true
|
||||||
mapfile -t supportedVer < <(echo "${versions_part}" | tr ',' '\n')
|
IFS=","; read -r -a supportedVer <<<"${versions_part}"
|
||||||
for x in "${supportedVer[@]}"
|
for x in "${supportedVer[@]}"
|
||||||
do
|
do
|
||||||
if [[ "${detected_version}" =~ $x ]];then
|
if [[ "${detected_version}" =~ $x ]];then
|
||||||
|
|
Loading…
Reference in a new issue