Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/system: Fix reading the os-release(5) ID on Ubuntu
The current approach of selecting all the os-release(5) fields that have 'ID' in their name (eg., ID, VERSION_ID, PLATFORM_ID, VARIANT_ID, etc.) and then picking the first one, assumes that the ID field will always be placed above the others in os-release(5). There's no guarantee that this will be the case. It only happens to be so on Fedora by chance, and is different on Ubuntu: $ cat /etc/os-release ... VERSION_ID="22.04" ... ID=ubuntu ID_LIKE=debian ... This means that "22.04" is read as the value of ID on Ubuntu, which is clearly wrong. Instead, use the same approach as profile.d/toolbox.sh and the old POSIX shell implementation that doesn't rely on the order of the os-release(5) fields. Fallout from 54a2ca1 containers#1320
- Loading branch information