From dcb253af59f0e18e706cb13e0d8c8d7467d23642 Mon Sep 17 00:00:00 2001 From: Mikhail Sandakov Date: Tue, 26 Nov 2024 10:22:32 +0200 Subject: [PATCH] fixup! fixup! fixup! 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pleskdistup/common/src/mounts.py b/pleskdistup/common/src/mounts.py index 20b07eb..86b22f7 100644 --- a/pleskdistup/common/src/mounts.py +++ b/pleskdistup/common/src/mounts.py @@ -36,13 +36,13 @@ def get_fstab_configuration_misorderings(configpath: str) -> typing.List[typing. continue parent_dir: str = mount_point - root_found: bool = True + root_found: bool = False - while root_found: + while not root_found: parent_dir = os.path.dirname(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)) if parent_dir == "/": - root_found = False + root_found = True return misorderings