Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve mounted check to support symlinks #132

Closed

Conversation

SlashDashAndCash
Copy link

This change improves the mounted? check

  1. Symlinks are now resolved to their canonical path
  2. Checks if the device is mounted to a specific mount point

Description

This pull request is similar to 130 by jrmycanady but also canonicalizes device paths in /proc/mounts. This is necessary because device paths in /prod/mount can be symlinks as well. For example, /dev/mapper/system-root referes to /dev/dm-0.

Issues Resolved

129 - filesystem tries to run mkfs every time when /dev/disk/by-id device path is used

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

libraries/fs.rb:37

  • The new behavior of raising an exception for invalid parameters in the 'mounted?' method should be covered by tests.
raise 'Invalid parameters passed to method "mounted?"'
@damacus damacus added the Release: Minor Release to Chef Supermarket as a minor release when merged label Dec 9, 2024
@damacus
Copy link
Member

damacus commented Dec 9, 2024

Can you rebase, or allow us to rebase and I'll merge this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release: Minor Release to Chef Supermarket as a minor release when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants