mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
remove ; so IFS changes don't stick
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net> Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
4b59287683
commit
7ea6d7b92b
@ -405,7 +405,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 '"')
|
||||||
|
|
||||||
IFS=" "; read -r -a supportedOS < <(dig +short -t txt ${remote_os_domain} | tr -d '"')
|
IFS=" " read -r -a supportedOS < <(dig +short -t txt ${remote_os_domain} | tr -d '"')
|
||||||
|
|
||||||
for i in "${supportedOS[@]}"
|
for i in "${supportedOS[@]}"
|
||||||
do
|
do
|
||||||
@ -414,7 +414,7 @@ os_check() {
|
|||||||
|
|
||||||
if [[ "${detected_os}" =~ ${os_part} ]]; then
|
if [[ "${detected_os}" =~ ${os_part} ]]; then
|
||||||
valid_os=true
|
valid_os=true
|
||||||
IFS=","; read -r -a supportedVer <<<"${versions_part}"
|
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
|
||||||
|
@ -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 '"')
|
||||||
|
|
||||||
IFS=" "; read -r -a supportedOS < <(dig +short -t txt ${remote_os_domain} | tr -d '"')
|
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
|
||||||
IFS=","; read -r -a supportedVer <<<"${versions_part}"
|
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 New Issue
Block a user