diff options
author | Amitay Isaacs <amitay@gmail.com> | 2016-10-17 17:18:33 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2016-10-18 12:15:57 +1100 |
commit | 6b4977d8a4d09a002261379ebd04bf5718dac104 (patch) | |
tree | 84708c8fe621b57cf5bf2e7d63d7319d81c484c1 | |
parent | f3a058a56c23656702a2ea737b5f3241a2189de8 (diff) | |
download | autocluster-6b4977d8a4d09a002261379ebd04bf5718dac104.tar.gz autocluster-6b4977d8a4d09a002261379ebd04bf5718dac104.tar.xz autocluster-6b4977d8a4d09a002261379ebd04bf5718dac104.zip |
Run net ads join under a timeout and exit if join fails
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
-rwxr-xr-x | base/all/root/scripts/tasks/setup_cluster_nas.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/all/root/scripts/tasks/setup_cluster_nas.sh b/base/all/root/scripts/tasks/setup_cluster_nas.sh index d970118..5635757 100755 --- a/base/all/root/scripts/tasks/setup_cluster_nas.sh +++ b/base/all/root/scripts/tasks/setup_cluster_nas.sh @@ -37,7 +37,8 @@ auth_type=$(sed -r -n -e 's@^auth_method[[:space:]]*=[[:space:]]*(files|winbind) case "$auth_type" in winbind) echo "Joining domain" - net ads join -U"$domain_auth" + timeout 10 net ads join -U"$domain_auth" || \ + { echo "Domain join failed"; exit 1; } ;; esac |