mount

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFstabFile = "/etc/fstab"
)

Variables

This section is empty.

Functions

func IsBindMountedWithFstab

func IsBindMountedWithFstab(mount BindMount) (alreadyMounted bool, fstabEntryAlreadyAdded bool, err error)

IsBindMountedWithFstab checks if the bind mount is currently mounted and if the fstab entry exists

func RemoveBindMountsWithFstab

func RemoveBindMountsWithFstab(mount BindMount) error

RemoveBindMountsWithFstab undoes bind mount setup It unmounts the bind mount and removes the entry from /etc/fstab

func SetupBindMountsWithFstab

func SetupBindMountsWithFstab(mount BindMount) error

SetupBindMountsWithFstab sets up a bind mount for the given target It adds an entry to /etc/fstab and performs the mount

Types

type BindMount

type BindMount struct {
	Source string
	Target string
}

Jump to

Keyboard shortcuts

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