user [email protected] usertags 675731 + events-hardware thanks Hi there!
I discovered this bug while working on a script to automatize the installation of the d-i BabelBox for the Debian Events Box: <http://wiki.debian.org/Teams/Events/DebianEventsBox>. On Fri, 13 Jul 2012 16:38:44 +0200, Raphael Hertzog wrote: > On Sun, 03 Jun 2012, Santiago Vila wrote: >> If you want "wheezy", why can't you do this if VERSION is empty? >> >> echo $PRETTY_NAME | awk '{ print $3 }' | sed -e 's#/.*##' > > To avoid such hackery, you could export a DEBIAN_CODENAME variable. > /etc/os-release allows for vendor-specific fields. If I read the os-release manpage correctly, Jeremy is right and VERSION is the place where 'wheezy' should be: <http://www.freedesktop.org/software/systemd/man/os-release.html> Options The following OS identifications parameters may be set using /etc/os-release: NAME= A string identifying the operating system, without a version component, and suitable for presentation to the user. If not set defaults to NAME=Linux. Example: NAME=Fedora or NAME="Debian GNU/Linux". VERSION= A string identifying the operating system version, excluding any OS name information, possibly including a release code name, and suitable for presentation to the user. This field is optional. Example: VERSION=17 or VERSION="17 (Beefy Miracle)". [...] VERSION_ID= A lower-case string (mostly numeric, no spaces or other characters outside of 0-9, a-z, ".", "_" and "-") identifying the operating system version, excluding any OS name information or release code name, and suitable for processing by scripts or usage in generated file names. This field is optional. Example: VERSION_ID=17 or VERSION_ID=11.04. PRETTY_NAME= A pretty operating system name in a format suitable for presentation to the user. May or may not contain a release code name or OS version of some kind, as suitable. If not set defaults to PRETTY_NAME="Linux". Example: PRETTY_NAME="Fedora 17 (Beefy Miracle)". IMHO the above translates to: * squeeze NAME="Debian GNU/Linux" VERSION="6.0.6 (squeeze)" VERSION_ID="6.0.6" PRETTY_NAME="$NAME $VERSION" * wheezy NAME="Debian GNU/Linux" VERSION="wheezy/sid" PRETTY_NAME="$NAME $VERSION" Please also note that the current behavior is inconsistent WRT /etc/debian_version, which has either the version number when on stable or the codename when (in the form "$NEXT_STABLE/sid"). Thx, bye, Gismo / Luca
pgpnEXYCWAZRw.pgp
Description: PGP signature

