Skip to content

Commit 539ff2a

Browse files
authored
Merge pull request #803 from microsoft/bliang/reorder-prompt
moved controller username password prompt to later
2 parents 4dbb298 + b41686c commit 539ff2a

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/setup-controller-new.sh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
#!/bin/bash
22

3-
# Get controller username and password as input. It is used as default for the controller.
4-
#
5-
if [ -z "$AZDATA_USERNAME" ]
6-
then
7-
read -p "Create Username for Azure Arc Data Controller: " username
8-
echo
9-
export AZDATA_USERNAME=$username
10-
fi
11-
if [ -z "$AZDATA_PASSWORD" ]
12-
then
13-
while true; do
14-
read -s -p "Create Password for Azure Arc Data Controller: " password
15-
echo
16-
read -s -p "Confirm your Password: " password2
17-
echo
18-
[ "$password" = "$password2" ] && break
19-
echo "Password mismatch. Please try again."
20-
done
21-
export AZDATA_PASSWORD=$password
22-
fi
23-
243
# Prompt for private preview repository username and password provided by Microsoft
254
#
265
if [ -z "$DOCKER_USERNAME" ]
@@ -67,6 +46,27 @@ then
6746
export ARC_DC_REGION=$dc_region
6847
fi
6948

49+
# Get controller username and password as input. It is used as default for the controller.
50+
#
51+
if [ -z "$AZDATA_USERNAME" ]
52+
then
53+
read -p "Create Username for Azure Arc Data Controller: " username
54+
echo
55+
export AZDATA_USERNAME=$username
56+
fi
57+
if [ -z "$AZDATA_PASSWORD" ]
58+
then
59+
while true; do
60+
read -s -p "Create Password for Azure Arc Data Controller: " password
61+
echo
62+
read -s -p "Confirm your Password: " password2
63+
echo
64+
[ "$password" = "$password2" ] && break
65+
echo "Password mismatch. Please try again."
66+
done
67+
export AZDATA_PASSWORD=$password
68+
fi
69+
7070
set -Eeuo pipefail
7171

7272
# This is a script to create single-node Kubernetes cluster and deploy Azure Arc Data Controller on it.

0 commit comments

Comments
 (0)