File tree 1 file changed +5
-2
lines changed 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,15 @@ mkdir -p ${output_dir}
25
25
echo -e " Compose packages.txt and dev_tools_file_list.txt"
26
26
tar zxf stemcell/* .tgz -C stemcell
27
27
28
+ sl_username=$( echo ${SL_USERNAME} | sed ' s/@/%40/g' )
29
+ # to make working CURL below we need the sed
30
+
28
31
# Create package.txt from "dpkg -l"
29
32
apt-get update
30
33
apt-get install -y jq
31
34
apt-get install -y sshpass
32
- root_pwd=$( echo ` curl -s -g -k https://${SL_USERNAME } :${SL_API_KEY} @api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/${stemcell_vm_id} /getSoftwareComponents? objectMask=mask[passwords[password]] | jq ' .[0].passwords[0].password' ` | sed -e ' s/"//g' )
33
- private_ip=$( echo ` curl -s -g -k https://${SL_USERNAME } :${SL_API_KEY} @api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/${stemcell_vm_id} /getObject? objectMask=mask[primaryIpAddress] | jq .primaryBackendIpAddress` | sed -e ' s/"//g' )
35
+ root_pwd=$( echo ` curl -s -g -k https://${sl_username } :${SL_API_KEY} @api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/${stemcell_vm_id} /getSoftwareComponents? objectMask=mask[passwords[password]] | jq ' .[0].passwords[0].password' ` | sed -e ' s/"//g' )
36
+ private_ip=$( echo ` curl -s -g -k https://${sl_username } :${SL_API_KEY} @api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/${stemcell_vm_id} /getObject? objectMask=mask[primaryIpAddress] | jq .primaryBackendIpAddress` | sed -e ' s/"//g' )
34
37
sshpass -p $root_pwd ssh -o StrictHostKeychecking=no root@${private_ip} " dpkg -l" > ${output_dir} /packages.txt
35
38
36
39
cp stemcell/dev_tools_file_list.txt ${output_dir}
You can’t perform that action at this time.
0 commit comments