mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-13 19:28:59 +00:00
read > mapfile as suggested by @dschaper
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
58724a38a9
commit
03a8cff55e
@ -405,7 +405,7 @@ os_check() {
|
||||
detected_os="${detected_os_pretty%% *}"
|
||||
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[@]}"
|
||||
do
|
||||
@ -414,7 +414,7 @@ os_check() {
|
||||
|
||||
if [[ "${detected_os}" =~ ${os_part} ]]; then
|
||||
valid_os=true
|
||||
mapfile -t supportedVer < <(echo "${versions_part}" | tr ',' '\n')
|
||||
IFS=","; read -r -a supportedVer <<<"${versions_part}"
|
||||
for x in "${supportedVer[@]}"
|
||||
do
|
||||
if [[ "${detected_version}" =~ $x ]];then
|
||||
|
Loading…
Reference in New Issue
Block a user