summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbase/all/root/scripts/tasks/setup_cluster_nas.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/base/all/root/scripts/tasks/setup_cluster_nas.sh b/base/all/root/scripts/tasks/setup_cluster_nas.sh
index 5635757..d584e5a 100755
--- a/base/all/root/scripts/tasks/setup_cluster_nas.sh
+++ b/base/all/root/scripts/tasks/setup_cluster_nas.sh
@@ -37,8 +37,15 @@ auth_type=$(sed -r -n -e 's@^auth_method[[:space:]]*=[[:space:]]*(files|winbind)
case "$auth_type" in
winbind)
echo "Joining domain"
- timeout 10 net ads join -U"$domain_auth" || \
- { echo "Domain join failed"; exit 1; }
+ for i in $(seq 1 5) ; do
+ status=0
+ timeout 10 net ads join -U"$domain_auth" || status=$?
+ echo " status = $status"
+ if [ $status -eq 0 ] ; then
+ break
+ fi
+ sleep 1
+ done
;;
esac