Comment 1 for bug 1667470

Revision history for this message
Chad Smith (chad.smith) wrote :

Confirmed that we can't use /etc/os-release directly from a snap as it posts snap-related information only. We instead need to parse /etc/lsb-release

dash-shell.dash
$ cat /etc/os-release
NAME="Ubuntu Core"
VERSION="16"
ID=ubuntu-core
PRETTY_NAME="Ubuntu Core 16"
VERSION_ID="16"
HOME_URL="http://www.snapcraft.io/"
BUG_REPORT_URL="http://bugs.launchpad.net/snappy/"

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"