Closed ahostetler300 closed 1 year ago
Thanks for the reply. Apologies, but I'm new to GitHub, and didn't realize I had initiated a PR to the main project, I had intended to keep my changes in my local branch.
That said, I'm happy to explain the reasoning behind my changes.
In general, I'm using this code for an edge video recorder, and typically this device runs unattended, so my needs are likely unique.
I'm closing the pull request, since this was not intended to be posted and was meant for a local branch with a specific usecase, as you clearly explained.
Thanks for taking the time to clarify.
Hi, Thanks for the PR!
I'm not sure about wanting to merge this as is, some notes:
Adding an uninstall goal to the Makefile is something I wanted to do, the problem is that it will also delete the possibly user-modified configuration in
/etc/media-automount.d
which might be a problem when reinstalling. Perhaps there should be a prompt asking the user whether they want to remove that one (and by default, don't remove any/etc/*
files).I'm not sure if using the UUID for the directory name by default is a good idea.
Could you elaborate on why you want this? The use of the label (with the device name as fallback) is meant to make it more identifiable for the end user. I don't think it would be very user friendly to use the UUID code as a folder name.
We could compromise by having the script not override the
AUTOMOUNT_DIR
environment variable. So that it would be possible for anyone to customize the directory name using, for example,/etc/media-automount.d/auto
, or to use special names for a particular FS TYPE.Either way, I think the check for conflicting names should stay, since we never know what other mounts might the user have. It'd be weird to have a mount with exactly the same name as the UUID, but it's not impossible, so I'd rather keep it, since in normal operation that check does not hurt and it can potentially help identify problems.
For detachable storage, if the user wants to retry they can always do it themselves re-plugging it. An error when mounting might be a sign that the storage wasn't properly attached, or some other reason that I'm not convinced it'll be fixed by just retrying the mount call.