diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index 0ddf93bc..15a854a8 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -151,12 +151,16 @@ def is_valid_wim_file(item): def get_mounted_volumes(): """Get mounted volumes, returns dict.""" cmd = [ - 'findmnt', '-J', '-b', '-i', - '-t', ( + 'findmnt', + '--list', + '--json', + '--bytes', + '--invert', + '--types', ( 'autofs,binfmt_misc,bpf,cgroup,cgroup2,configfs,debugfs,devpts,' 'devtmpfs,hugetlbfs,mqueue,proc,pstore,securityfs,sysfs,tmpfs' ), - '-o', 'SOURCE,TARGET,FSTYPE,LABEL,SIZE,AVAIL,USED'] + '--output', 'SOURCE,TARGET,FSTYPE,LABEL,SIZE,AVAIL,USED'] json_data = get_json_from_command(cmd) mounted_volumes = [] for item in json_data.get('filesystems', []): @@ -195,6 +199,8 @@ def mount_volumes( volumes.update({child['name']: child}) for grandchild in child.get('children', []): volumes.update({grandchild['name']: grandchild}) + for great_grandchild in grandchild.get('children', []): + volumes.update({great_grandchild['name']: great_grandchild}) # Get list of mounted volumes mounted_volumes = get_mounted_volumes()