Conversation
Signed-off-by: Justin Landmann <justin.landmann@plusserver.com>
5c29d11 to
92428a6
Compare
| dist_version="jessie" | ||
| ;; | ||
| esac | ||
| dist_version="$(sed -n 's/^VERSION_CODENAME=//p' < /etc/os-release )" |
There was a problem hiding this comment.
This could take the same approach as get_distribution();
Lines 163 to 172 in 0225270
if [ -r /etc/os-release ]; then
lsb_dist="$(. /etc/os-release && echo "$VERSION_CODENAME")"
fiHowever, I'm not sure how reliable codename is here, taking sid into account (on Debian); not sure if raspbian also uses sid, but if so, then it's likely that the codename doesn't always match the version.
There was a problem hiding this comment.
That is correct. Sid does not set the VERSION_CODENAME in /etc/os-release.
raspbian uses the codename of the next release "bookworm" or "testing" instead of sid.
However these versions are not present at download.docker.com which would let the script fail at that point. (or is there a testing/unstable repo?)
I would mimic the "lsb_dist=" style with the debian dist_version. lsb_dist would be for getting the os type while dist_version would get the debian/raspbian codename as ubuntu still behaves drifferent.
| dist_version="$(sed -n 's/^VERSION_CODENAME=//p' < /etc/os-release )" | |
| dist_version="$(. /etc/os-release && echo "$VERSION_CODENAME")" |
Would that be alright?
As mentioned in some issues #262 #270 #271
The debian codename resolving is somewhat broken.
This is a stable fix which works down to debian squeeze.
It may also work for ubuntu but this is only the debian integration.