File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1919# Source functions
2020. /opt/cfncluster/scripts/functions.shlib
2121
22+ # Check DNS
23+ check_dns || error_exit " DNS checks failed."
24+
2225# Run preinstall script if defined
2326run_preinstall
2427
Original file line number Diff line number Diff line change 1919# Source functions
2020. /opt/cfncluster/scripts/functions.shlib
2121
22+ # Check DNS
23+ check_dns || error_exit " DNS checks failed."
24+
2225# Run preinstall script if defined
2326run_preinstall
2427
Original file line number Diff line number Diff line change @@ -15,6 +15,22 @@ function error_exit () {
1515 exit 1
1616}
1717
18+ # Check DNS is working, as it is required for correct operation
19+ function check_dns () {
20+ TRY=0
21+ while [ $TRY -lt 3 ]; do
22+ hostname -f >/dev/null
23+ check_fqdn=$?
24+ if [ $check_fqdn -eq 0 ]; then
25+ break
26+ else
27+ sleep 10
28+ TRY=$(( $TRY + 1 ))
29+ fi
30+ done
31+ return $check_fqdn
32+ }
33+
1834# Check and run preinstall
1935function run_preinstall () {
2036 RC=0
You can’t perform that action at this time.
0 commit comments