mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Report and exit if dig supportedOS returns nothing
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
dffb58ae8f
commit
b207ceeab2
1 changed files with 20 additions and 15 deletions
|
@ -190,6 +190,10 @@ os_check() {
|
||||||
|
|
||||||
IFS=" " read -r -a supportedOS < <(dig +short -t txt ${remote_os_domain} @ns1.pi-hole.net | tr -d '"')
|
IFS=" " read -r -a supportedOS < <(dig +short -t txt ${remote_os_domain} @ns1.pi-hole.net | tr -d '"')
|
||||||
|
|
||||||
|
if [ -z "$supportedOS" ]; then
|
||||||
|
printf " %b %bRetrieval of supported OS failed. Please contact support. %b\\n" "${CROSS}" "${COL_LIGHT_RED}" "${COL_NC}"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
for i in "${supportedOS[@]}"
|
for i in "${supportedOS[@]}"
|
||||||
do
|
do
|
||||||
os_part=$(echo "$i" | cut -d '=' -f1)
|
os_part=$(echo "$i" | cut -d '=' -f1)
|
||||||
|
@ -208,6 +212,7 @@ os_check() {
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$valid_os" = true ] && [ "$valid_version" = true ]; then
|
if [ "$valid_os" = true ] && [ "$valid_version" = true ]; then
|
||||||
display_warning=false
|
display_warning=false
|
||||||
|
|
Loading…
Reference in a new issue