diff options
author | Maxim Devaev <[email protected]> | 2022-06-13 21:10:51 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-06-13 21:10:51 +0300 |
commit | 9769b2f754eed35a636259f3aa9717256a44cd26 (patch) | |
tree | 3005654f29dacf3e6ba788e2ba6777f0de1ce004 /kvmd | |
parent | 6eb02a2bd5d1f4d326651432f095b9c97a239182 (diff) |
optional X-kvmd.otgmsd-* values
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/helpers/remount/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/helpers/remount/__init__.py b/kvmd/helpers/remount/__init__.py index 960339f3..5c833a39 100644 --- a/kvmd/helpers/remount/__init__.py +++ b/kvmd/helpers/remount/__init__.py @@ -56,11 +56,11 @@ def _find_storage(target: str) -> _Storage: if line and not line.startswith("#"): parts = line.split() if len(parts) == 6: - options = dict(re.findall(r"X-kvmd\.%s-(root|user)=([^,]+)" % (target), parts[3])) + options = dict(re.findall(r"X-kvmd\.%s-(root|user)(?:=([^,]+))?" % (target), parts[3])) if options: return _Storage( mount_path=parts[1], - root_path=options.get("root", ""), + root_path=(options.get("root", "") or parts[1]), user=options.get("user", ""), ) raise SystemExit(f"Can't find {target!r} mountpoint in {_FSTAB_PATH}") |