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

Consider symlinking fusermount3 to fusermount if the latter doesn't exist #123

Open
markstos opened this issue Apr 5, 2024 · 0 comments

Comments

@markstos
Copy link
Contributor

markstos commented Apr 5, 2024

Attempting to use restic mount failed out of the box on Fedora Linux today, because it provides fusermount3 and not fusermount.
After symlinking /usr/local/bin/fusermount3 to /usr/bin/fusermount, Restic could succeed.

I suggest this role check for the case where fusermount is missing but fusermount3 is present. In that case add a symlink, as above.

By adding the symlink in /usr/local and not /usr/bin, it should not interfere with actual package files.

Something like the following. I could create a PR for if there's agreement:

    - name: Check if fusermount is available
      tags: fuse
      ansible.builtin.command: which fusermount
      register: fusermount_check
      ignore_errors: true

    - name: Check if fusermount3 is available
      tags: fuse
      ansible.builtin.command: which fusermount3
      register: fusermount3_check
      ignore_errors: true

    - name: Create symlink for fusermount3 (if it exists and fusermount does not)
      tags: fuse
      # (Return code of zero is success)
      when: 
        - fusermount_check.rc > 0
        - fusermount3_check.rc == 0
      ansible.builtin.file:
        src: /usr/bin/fusermount3
        dest: /usr/local/bin/fusermount
        state: link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant