diff options
author | Carsten Lund <lund@research.att.com> | 2017-02-21 01:36:45 +0000 |
---|---|---|
committer | Carsten Lund <lund@research.att.com> | 2017-02-21 01:36:45 +0000 |
commit | 5cf8a5e53a88ddf772bf76fe0814ddbc80d7ae8e (patch) | |
tree | 52abae6223264f73810bc4e31f3a696b248bb19f /dcae-controller-service-vm/dcae-controller-service-vm-adaptor | |
parent | 987b9944ced2168abd4a1bd0aa663da627d5fd6c (diff) |
Handle HTTP steps without passwords
Change-Id: I005d4a4b0479a94658f117c16eb3563ac1246fd7
Signed-off-by: Carsten Lund <lund@research.att.com>
Diffstat (limited to 'dcae-controller-service-vm/dcae-controller-service-vm-adaptor')
-rw-r--r-- | dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata index 9f1ea4f..6b1f636 100644 --- a/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata +++ b/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/src/main/java/HttpInstallationStep.userdata @@ -3,7 +3,15 @@ if [ ! -e /home/%{applicationId} ]; then useradd -m -s /bin/bash %{applicationId OUT=/tmp/`basename %{url}` -curl -k -f --user '%{userName}:%{password}' -o \$OUT %{url} +case '%{userName}:%{password}' in + null:null) + curl -k -f -o \$OUT %{url} + ;; + *) + curl -k -f --user '%{userName}:%{password}' -o \$OUT %{url} + ;; +esac + case %{type} in deb) |