CLOUDSTACK-10382: Fix cloud-get-vm-data-configdrive.in - #2688
Conversation
| filepath=$mountdir/cloudstack | ||
|
|
||
| user_data=$filepath/userdata/user_data.txt | ||
| availability_zone=$filepath/metadata/availability_zone.txt |
There was a problem hiding this comment.
This assumes that bash is available, will the syntactic changes work with sh?
There was a problem hiding this comment.
The original script was only working under bash as well. function is a keyword unknown in sh.
As specified in the description, the changes require Bash 4.
I can also add a version specifically for bash 3, but I suppose with shellshock most people will have upgraded to bash 4 by now.
|
@PaulAngus I am fine with this as well. @rhtyd this is only a problem for client instances that use older versions of bash, isn't it? |
|
I've not tested, but I'm okay with the change as well. |
yadvr
left a comment
There was a problem hiding this comment.
LGTM, a manual test is needed to validate the change. Integration tests are not necessary.
DaanHoogland
left a comment
There was a problem hiding this comment.
@fmaximus' test is good enough for me.

Description
Fix file locations and lookup.
Cleanup of code - requires bash v4.
Types of changes
GitHub Issue/PRs
Screenshots (if appropriate):
How Has This Been Tested?
Checklist:
Testing