osbuild: add mount ostree helper method to Stage
A convenience method that adds an ostree deployment mount to any Stage.
This commit is contained in:
parent
4a68df45c7
commit
0ff1c3241c
1 changed files with 8 additions and 0 deletions
|
|
@ -17,3 +17,11 @@ type Stage struct {
|
|||
type StageOptions interface {
|
||||
isStageOptions()
|
||||
}
|
||||
|
||||
// MountOSTree adds an ostree mount to a stage which makes it run in a deployed
|
||||
// ostree stateroot.
|
||||
func (s *Stage) MountOSTree(osName, ref string, serial int) {
|
||||
name := "ostree-" + ref
|
||||
ostreeMount := NewOSTreeDeploymentMount(name, osName, ref, serial)
|
||||
s.Mounts = append(s.Mounts, *ostreeMount)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue