Skip to content

Commit d1dc6c7

Browse files
committed
refactor userspace_btrfs into btrfs_userspace
1 parent 173e974 commit d1dc6c7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Importing this module will run `btrfs device scan` and pull btrfs modules.
314314
* `autodetect_root_subvol` (true) Autodetect the root subvolume, unless `root_subvol` or `subvol_selector` is set. Depends on `hostonly`.
315315
* `root_subvol` - Set the desired root subvolume.
316316
* `_base_mount_path` (/root_base) Sets where the subvolume selector mounts the base filesytem to scan for subvolumes.
317-
* `userspace_btrfs` (true) Add btrfs binary to be able to mount multi-device btrfs partitions.
317+
* `btrfs_userspace` (true) Add btrfs binary to be able to mount multi-device btrfs partitions.
318318

319319
#### ugrd.fs.resume
320320

src/ugrd/fs/btrfs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _process_subvol_selector(self, subvol_selector: bool) -> None:
7575
self["paths"] = self["_base_mount_path"]
7676

7777

78-
@contains("userspace_btrfs", message="userspace_btrfs is disabled, will not add btrfs_scan to init.")
78+
@contains("btrfs_userspace", message="btrfs_userspace is disabled, will not add btrfs_scan to init.")
7979
def btrfs_scan(self) -> str:
8080
"""scan for new btrfs devices."""
8181
return 'einfo "$(btrfs device scan)"'
@@ -99,7 +99,7 @@ def autodetect_root_subvol(self):
9999

100100
@contains("subvol_selector", message="subvol_selector is not enabled, skipping.")
101101
@unset("root_subvol", message="root_subvol is set, skipping.")
102-
@contains("userspace_btrfs", message="userspace_btrfs is not enabled, skipping.")
102+
@contains("btrfs_userspace", message="btrfs_userspace is not enabled, skipping.")
103103
def select_subvol(self) -> str:
104104
"""Returns a POSIX shell script to list subvolumes on the root volume."""
105105
return f"""
@@ -137,7 +137,7 @@ def set_root_subvol(self) -> str:
137137
_validate_root_subvol(self)
138138
return f"""setvar root_extra_options ',subvol={self["root_subvol"]}'"""
139139

140-
@contains("userspace_btrfs", message="userspace_btrfs is disabled, skipping adding btrfs to binaries list.")
140+
@contains("btrfs_userspace", message="btrfs_userspace is disabled, skipping adding btrfs to binaries list.")
141141
def add_btrfs_deps(self):
142142
self.logger.debug("Adding btrfs to binaries list.")
143143
self["binaries"] = "btrfs"

src/ugrd/fs/btrfs.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kmod_init = [ "btrfs", "crc32c" ] # crc32c is a softdep but more or less require
33
_base_mount_path = "/root_base"
44
subvol_selector = false
55
autodetect_root_subvol = true
6-
userspace_btrfs = true
6+
btrfs_userspace = true
77

88
[imports.config_processing]
99
"ugrd.fs.btrfs" = [ "_process_root_subvol", "_process_subvol_selector" ]
@@ -31,4 +31,4 @@ _base_mount_path = "Path" # Set the mount point for the root filesystem when us
3131
root_subvol = "str" # Set the default btrfs subvolume for the root filesystem
3232
subvol_selector = "bool" # Select a btrfs subvolume for the root partition at runtime
3333
autodetect_root_subvol = "bool" # Automatically detect the root subvolume
34-
userspace_btrfs = "bool" # Add btrfs binary to be able to mount multi-device btrfs partitions
34+
btrfs_userspace = "bool" # Add btrfs binary to be able to mount multi-device btrfs partitions

0 commit comments

Comments
 (0)