File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2020. /opt/cfncluster/scripts/functions.shlib
2121
2222# Check basic DNS
23- check_dns_ns || error_exit " Basic DNS checks failed."
23+ check_dns_basic || error_exit " Basic DNS checks failed."
2424
2525# Run preinstall script if defined
2626run_preinstall
Original file line number Diff line number Diff line change 2020. /opt/cfncluster/scripts/functions.shlib
2121
2222# Check basic DNS
23- check_dns_ns || error_exit " Basic DNS checks failed."
23+ check_dns_basic || error_exit " Basic DNS checks failed."
2424
2525# Run preinstall script if defined
2626run_preinstall
Original file line number Diff line number Diff line change @@ -15,21 +15,21 @@ function error_exit () {
1515 exit 1
1616}
1717
18- # Basic DNS check, using dnsdomain and checking for NS record
19- function check_dns_ns () {
18+ # Basic DNS check, using A record for cloudformation endpoint
19+ function check_dns_basic () {
2020 TRY=0
21- domain=$(dnsdomainname)
21+ domain="cloudformation.${cfn_region}.amazonaws.com"
2222 while [ $TRY -lt 3 ]; do
23- host -t ns $domain >/dev/null
24- check_ns =$?
25- if [ $check_ns -eq 0 ]; then
23+ host $domain >/dev/null
24+ check_dns =$?
25+ if [ $check_dns -eq 0 ]; then
2626 break
2727 else
2828 sleep 10
2929 TRY=$(( $TRY + 1 ))
3030 fi
3131 done
32- return $check_ns
32+ return $check_dns
3333}
3434
3535# Check DNS is working, as it is required for correct operation
You can’t perform that action at this time.
0 commit comments