From 7b629d3e7510bd174ae57f436f91ae01f2e0afc0 Mon Sep 17 00:00:00 2001 From: Mikhail Sandakov Date: Tue, 26 Nov 2024 10:16:26 +0200 Subject: [PATCH] fixup! fixup! fixup! fixup! Add a preliminary checker to ensure the mount points in /etc/fstab are in the correct order --- pleskdistup/common/src/mounts.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pleskdistup/common/src/mounts.py b/pleskdistup/common/src/mounts.py index 73e22ae..d00fb78 100644 --- a/pleskdistup/common/src/mounts.py +++ b/pleskdistup/common/src/mounts.py @@ -38,10 +38,10 @@ def get_fstab_configuration_misorderings(configpath: str) -> typing.List[typing. if "/" in mount_points_order and mount_points_order["/"] > mount_points_order[mount_point]: misorderings.append(("/", mount_point)) - parant_dir = os.path.dirname(mount_point) - while parant_dir != "/": - if parant_dir in mount_points_order and mount_points_order[parant_dir] > mount_points_order[mount_point]: - misorderings.append((parant_dir, mount_point)) - parant_dir = os.path.dirname(parant_dir) + parent_dir = os.path.dirname(mount_point) + while parent_dir != "/": + if parent_dir in mount_points_order and mount_points_order[parent_dir] > mount_points_order[mount_point]: + misorderings.append((parent_dir, mount_point)) + parent_dir = os.path.dirname(parent_dir) return misorderings