Closed benfrancis closed 1 month ago
This is the first step in porting WebThings Gateway to Ubuntu Core.
Ubuntu Core does not ship with the lsb_release command so we have to add some snap-specific code to check for the existence of a distro ID in /var/lib/snapd/hostfs/etc/os-release, which relates to the host OS. See https://forum.snapcraft.io/t/hosts-lsb-release-but-core-os-release/24351/4
lsb_release
/var/lib/snapd/hostfs/etc/os-release
@ogra1 Is this the cleanest way of doing this?
Yes, using the system-observe interface is indeed the best way for a snap to know what the actual host environment is.
This is the first step in porting WebThings Gateway to Ubuntu Core.
Ubuntu Core does not ship with the
lsb_release
command so we have to add some snap-specific code to check for the existence of a distro ID in/var/lib/snapd/hostfs/etc/os-release
, which relates to the host OS. See https://forum.snapcraft.io/t/hosts-lsb-release-but-core-os-release/24351/4