Files
warewulf/internal/pkg/config/mounts.go
Jonathon Anderson 59f187bf5e Convert disk booleans from wwbool to *bool
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-09-05 14:16:03 +02:00

24 lines
634 B
Go

package config
import (
"github.com/warewulf/warewulf/internal/pkg/util"
)
// A MountEntry represents a bind mount that is applied to an image
// during exec and shell.
type MountEntry struct {
Source string `yaml:"source"`
Dest string `yaml:"dest,omitempty"`
ReadOnlyP *bool `yaml:"readonly,omitempty"`
Options string `yaml:"options,omitempty"` // ignored at the moment
CopyP *bool `yaml:"copy,omitempty"` // temporarily copy the file into the image
}
func (mount MountEntry) ReadOnly() bool {
return util.BoolP(mount.ReadOnlyP)
}
func (mount MountEntry) Copy() bool {
return util.BoolP(mount.CopyP)
}