git.samba.org
/
tridge
/
autocluster.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dabaa29
)
Try 5 times to join AD domain before failing
author
Amitay Isaacs
<amitay@gmail.com>
Thu, 10 Nov 2016 02:48:52 +0000
(13:48 +1100)
committer
Amitay Isaacs
<amitay@gmail.com>
Thu, 10 Nov 2016 02:48:52 +0000
(13:48 +1100)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
base/all/root/scripts/tasks/setup_cluster_nas.sh
patch
|
blob
|
history
diff --git
a/base/all/root/scripts/tasks/setup_cluster_nas.sh
b/base/all/root/scripts/tasks/setup_cluster_nas.sh
index 5635757ddb0823ce568f3cde25d4f8bc4539aadb..d584e5a9892ac1858789685e4419642d997b33a1 100755
(executable)
--- 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