mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Count elements of array instead
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
b207ceeab2
commit
6fc7dc28a2
@ -190,7 +190,7 @@ 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
|
if [ ${#supportedOS[@]} -eq 0 ]; then
|
||||||
printf " %b %bRetrieval of supported OS failed. Please contact support. %b\\n" "${CROSS}" "${COL_LIGHT_RED}" "${COL_NC}"
|
printf " %b %bRetrieval of supported OS failed. Please contact support. %b\\n" "${CROSS}" "${COL_LIGHT_RED}" "${COL_NC}"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user