Skip to content

Commit 13b918b

Browse files
committed
updated autodetect_root to also detect the filesystem type
Signed-off-by: Zen <[email protected]>
1 parent e784131 commit 13b918b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ugrd"
7-
version = "0.15.1"
7+
version = "0.15.2"
88
authors = [
99
{ name="Desultory", email="[email protected]" },
1010
]

src/ugrd/fs/mounts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ def autodetect_root(self) -> None:
167167
mount_data = root_mount_info.partition(':')[2].strip().split(' ')
168168
root_dict = {key: value for key, value in (entry.split('=') for entry in mount_data)}
169169

170+
if mount_type := root_dict.get('TYPE'):
171+
self.logger.info("Autodetected root type: %s" % mount_type)
172+
self['mounts']['root']['type'] = mount_type.lower()
173+
170174
if label := root_dict.get('LABEL'):
171175
self.logger.info("Autodetected root label: %s" % label)
172176
self['mounts']['root']['source'] = {'label': label}

0 commit comments

Comments
 (0)