Closed chorrell closed 9 years ago
Cool.
Alternatively, is there a more reliable way to get the distro here? From my Linux days I vaguely recall lsb_release
or something like that.
RE: lsb-release
It's not always installed, depending on the distro (from what I recall), so my inclination is to not explicitly rely on that. We could have it pre-installed, but I would rather keep things as lean as possible.
Resolved in f997274
See pull #2
The linux-prepare-image script has the following (tools/prepare-image/linux-prepare-image starting on line 209):
On newer Images, we switched to using proper caps for distro names in the /etc/product file ("CentOS" instead of "centos" for example) so the code on lines 214-219 won't call the appropriate function per distro. Image Management still works, just some extra prepare steps are skipped (the updated guest tools actually take care of a lot of this by the way).
A way to deal with that change would be to convert the distro name to all lowercase first:
That also allows you to simplify the "elif" block as well so you can just check for "ubuntu".