distributions

package
v1.25.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DistributionDebian10     = Distribution{/* contains filtered or unexported fields */}
	DistributionDebian11     = Distribution{/* contains filtered or unexported fields */}
	DistributionUbuntu1804   = Distribution{/* contains filtered or unexported fields */}
	DistributionUbuntu2004   = Distribution{/* contains filtered or unexported fields */}
	DistributionUbuntu2010   = Distribution{/* contains filtered or unexported fields */}
	DistributionUbuntu2104   = Distribution{/* contains filtered or unexported fields */}
	DistributionUbuntu2110   = Distribution{/* contains filtered or unexported fields */}
	DistributionUbuntu2204   = Distribution{/* contains filtered or unexported fields */}
	DistributionAmazonLinux2 = Distribution{/* contains filtered or unexported fields */}
	DistributionRhel8        = Distribution{/* contains filtered or unexported fields */}
	DistributionRocky8       = Distribution{/* contains filtered or unexported fields */}
	DistributionFlatcar      = Distribution{/* contains filtered or unexported fields */}
	DistributionContainerOS  = Distribution{/* contains filtered or unexported fields */}
)

Functions

This section is empty.

Types

type Distribution

type Distribution struct {
	// contains filtered or unexported fields
}

Distribution represents a particular version of an operating system. This enables OS-dependent logic.

func FindDistribution

func FindDistribution(rootfs string) (Distribution, error)

FindDistribution identifies the distribution on which we are running

func (*Distribution) DefaultUsers added in v1.20.0

func (d *Distribution) DefaultUsers() ([]string, error)

DefaultUsers returns the name of the system users for this distribution

func (*Distribution) HasLoopbackEtcResolvConf added in v1.20.0

func (d *Distribution) HasLoopbackEtcResolvConf() bool

HasLoopbackEtcResolvConf is true if systemd-resolved has put the loopback address 127.0.0.53 as a nameserver in /etc/resolv.conf See https://github.com/coredns/coredns/blob/master/plugin/loop/README.md#troubleshooting-loops-in-kubernetes-clusters

func (*Distribution) IsDebianFamily

func (d *Distribution) IsDebianFamily() bool

IsDebianFamily returns true if this distribution uses deb packages and generally follows debian package names

func (*Distribution) IsRHELFamily

func (d *Distribution) IsRHELFamily() bool

IsRHELFamily returns true if this distribution uses rpm packages and generally follows rhel package names

func (*Distribution) IsSystemd

func (d *Distribution) IsSystemd() bool

IsSystemd returns true if this distribution uses systemd

func (*Distribution) IsUbuntu

func (d *Distribution) IsUbuntu() bool

IsUbuntu returns true if this distribution is Ubuntu (but not debian)

func (*Distribution) Version added in v1.20.0

func (d *Distribution) Version() float32

Version returns the (project scoped) numeric version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL