blob: d85ed9af31da9bf1950b98ff39b9d644034ffdf4 [file] [log] [blame]
David K. Bainbridge528b3182017-01-23 08:51:59 -08001// Copyright 2011, 2012, 2013 Canonical Ltd.
2// Licensed under the LGPLv3, see LICENCE file for details.
3
4package utils
5
6import (
7 "strings"
8)
9
10// IsUbuntu executes lxb_release to see if the host OS is Ubuntu.
11func IsUbuntu() bool {
12 out, err := RunCommand("lsb_release", "-i", "-s")
13 if err != nil {
14 return false
15 }
16 return strings.TrimSpace(out) == "Ubuntu"
17}