Skip to main content

Module mounts

Module mounts 

Source
Expand description

Filesystem mount + swap actions.

GetMounts is a read-only inventory (findmnt --json). The four mutating actions (AddMount, RemoveMount, AddSwap, RemoveSwap) all delegate to the root-owned helper /usr/lib/sysknife/mount-edit, which keeps /etc/fstab in sync and — crucially — writes every managed entry with nofail, so a bad or absent device can never wedge the boot. See packaging/sysknife-mount-edit.

Functions§

add_mount
Mount a device and persist it to /etc/fstab (with nofail).
add_swap
Create a swap file, enable it, and persist it to /etc/fstab.
get_mounts
List mounted filesystems as JSON (findmnt --json). Read-only.
remove_mount
Unmount and remove the /etc/fstab entry for a mountpoint.
remove_swap
Disable a swap file, remove it, and drop its /etc/fstab entry.
specs