Skip to content

Commit

Permalink
expose sysfs overlay option
Browse files Browse the repository at this point in the history
  • Loading branch information
jawn-smith authored and masahiro-nakagawa committed Feb 2, 2024
1 parent b223c38 commit efeb802
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/commands/snap.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type SnapOpts struct {
Snaps []string `long:"snap" description:"Install extra snaps. These are passed through to \"snap prepare-image\". The snap argument can include additional information about the channel and/or risk with the following syntax: <snap>=<channel|risk>" value-name:"SNAP"`
CloudInit string `long:"cloud-init" description:"cloud-config data to be copied to the image" value-name:"USER-DATA-FILE"`
Revisions map[string]int `long:"revision" description:"The revision of a specific snap to install in the image." value-name:"REVISION"`
Validation string `long:"validation" description:"Control whether validations should be ignored or enforced" choice:"ignore" choice:"enforce"`
SysfsOverlay string `long:"sysfs-overlay" description:"The optional sysfs overlay to used for preseeding. Directories from /sys/class/* and /sys/devices/platform will be bind-mounted to the chroot when preseeding"`
}

type SnapCommand struct {
Expand Down
1 change: 1 addition & 0 deletions internal/statemachine/snap_states.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (stateMachine *StateMachine) prepareImage() error {
// preseeding-related
imageOpts.Preseed = snapStateMachine.Opts.Preseed
imageOpts.PreseedSignKey = snapStateMachine.Opts.PreseedSignKey
imageOpts.SysfsOverlay = snapStateMachine.Opts.SysfsOverlay
imageOpts.AppArmorKernelFeaturesDir = snapStateMachine.Opts.AppArmorKernelFeaturesDir
imageOpts.SeedManifestPath = filepath.Join(stateMachine.commonFlags.OutputDir, "seed.manifest")

Expand Down

0 comments on commit efeb802

Please sign in to comment.