preseed

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package preseed provides functions for preseeding of classic and UC20 systems. Preseeding runs snapd in special mode that executes significant portion of initial seeding in a chroot environment and stores the resulting modifications in the image so that they can be reused and skipped on first boot, speeding it up.

Index

Constants

This section is empty.

Variables

View Source
var (
	Stdout io.Writer = os.Stdout
	Stderr io.Writer = os.Stderr
)

Functions

func Classic

func Classic(chrootDir string) error

Classic runs preseeding of a classic ubuntu system pointed by chrootDir.

func Core20

func Core20(prepareImageDir, preseedSignKey, aaFeaturesDir string) error

Core20 runs preseeding of UC20 system prepared by prepare-image in prepareImageDir and stores the resulting preseed preseed.tgz file in system-seed/systems/<systemlabel>/preseed.tgz. Expects single systemlabel under systems directory.

func MockMakePreseedTempDir

func MockMakePreseedTempDir(f func() (string, error)) (restore func())

func MockMakeWritableTempDir

func MockMakeWritableTempDir(f func() (string, error)) (restore func())

func MockSnapdMountPath

func MockSnapdMountPath(path string) (restore func())

func MockSyscallChroot

func MockSyscallChroot(f func(string) error) (restore func())

func MockSystemSnapFromSeed

func MockSystemSnapFromSeed(f func(rootDir, sysLabel string) (string, string, error)) (restore func())

func MockTrusted

func MockTrusted(mockTrusted []asserts.Assertion) (restore func())

func ResetPreseededChroot

func ResetPreseededChroot(preseedChroot string) error

ResetPreseededChroot removes all preseeding artifacts from preseedChroot (classic Ubuntu only).

Types

This section is empty.

Jump to

Keyboard shortcuts

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