Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! Add a preliminary checker to ensure the m…
Browse files Browse the repository at this point in the history
…ount points in /etc/fstab are in the correct order
  • Loading branch information
Mikhail Sandakov committed Nov 26, 2024
1 parent 953f878 commit 7b629d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pleskdistup/common/src/mounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7b629d3

Please sign in to comment.