Skip to content

Commit 08dc130

Browse files
committed
fix argument parsing for no-autodetect-luks, improve mounts error
handling Signed-off-by: Zen <[email protected]>
1 parent 746e4dd commit 08dc130

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ classifiers = [
1818
]
1919

2020
dependencies = [
21-
"zenlib >= 2.0.3",
21+
"zenlib >= 2.0.4",
2222
"pycpio >= 1.0.0"
2323
]
2424

src/ugrd/fs/mounts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def mount_root(self) -> str:
423423
'mount "$(cat /run/MOUNTS_ROOT_SOURCE)" "$(cat /run/MOUNTS_ROOT_TARGET)" -o "$(cat /run/MOUNTS_ROOT_OPTIONS)"']
424424

425425

426-
@check_dict({'mounts': {'root': 'source'}}, log_level=20, raise_exception=True, message="Root mount source is not defined.")
426+
@check_dict({'mounts': {'root': 'source'}}, not_empty=True, log_level=20, raise_exception=True, message="Root mount source is not defined.")
427427
def export_mount_info(self) -> None:
428428
""" Exports mount info based on the config to /run/MOUNTS_ROOT_{option} """
429429
return [f'echo -n "{self["mounts"]["root"]["destination"]}" > "/run/MOUNTS_ROOT_TARGET"',

src/ugrd/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main():
2424
{'flags': ['--autodetect-root'], 'action': 'store_true', 'help': 'Autodetect the root partition.'},
2525
{'flags': ['--no-autodetect-root'], 'action': 'store_false', 'help': 'Do not autodetect the root partition.', 'dest': 'autodetect_root'},
2626
{'flags': ['--autodetect-root-luks'], 'action': 'store_true', 'help': 'Autodetect LUKS volumes under the root partition.'},
27-
{'flags': ['--no-autodetect-root-luks'], 'action': 'store_false', 'help': 'Do not autodetect root LUKS volumes.', 'dest': 'autodetect_root'},
27+
{'flags': ['--no-autodetect-root-luks'], 'action': 'store_false', 'help': 'Do not autodetect root LUKS volumes.', 'dest': 'autodetect_root_luks'},
2828
{'flags': ['--print-config'], 'action': 'store_true', 'help': 'Print the final config dict.'},
2929
{'flags': ['out_file'], 'action': 'store', 'help': 'Output file location', 'nargs': '?'}]
3030

0 commit comments

Comments
 (0)