ocket8888 commented on a change in pull request #5209: URL: https://github.com/apache/trafficcontrol/pull/5209#discussion_r574868699
########## File path: infrastructure/cdn-in-a-box/traffic_vault/poststart.d/02-add-search-schema.sh ########## @@ -16,7 +16,7 @@ # under the License. source /to-access.sh -curl -kvs -XPUT -H 'Content-Type:application/xml' "https://$TV_ADMIN_USER:$TV_ADMIN_PASSWORD@$TV_FQDN:$TV_HTTPS_PORT/search/schema/sslkeys" -d @/sslkeys.xml +curl -kvs -XPUT -H 'Content-Type:application/xml' "https://$TV_ADMIN_USER:$TV_ADMIN_PASSWORD@$TV_FQDN:$TV_HTTPS_PORT/search/schema/sslkeys" -d @/sslkeys.xml || cat /var/log/riak/* Review comment: The or here is not being applied to what data to use, it's the second-lowest shell operator binding. So this isn't ```bash curl -kvs -XPUT -H 'Content-Type:application/xml' "https://$TV_ADMIN_USER:$TV_ADMIN_PASSWORD@$TV_FQDN:$TV_HTTPS_PORT/search/schema/sslkeys" -d (@/sslkeys.xml || cat /var/log/riak/*) ``` (which I don't think would even actually work like that), it's ```bash (curl -kvs -XPUT -H 'Content-Type:application/xml' "https://$TV_ADMIN_USER:$TV_ADMIN_PASSWORD@$TV_FQDN:$TV_HTTPS_PORT/search/schema/sslkeys" -d @/sslkeys.xml) || (cat /var/log/riak/*) ``` that is, the second command runs if the first one fails. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
