Re: Hooks for automount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2021-03-23 at 22:40 +0000, Patrick O'Callaghan wrote:
> On Wed, 2021-03-24 at 06:02 +0800, Ed Greshko wrote:
> > On 23/03/2021 18:57, Patrick O'Callaghan wrote:
> > > Sure, I'd like to see it. I've been testing various mods to the
> > > whole
> > > thing because I couldn't get it to work reliably, i.e. the loop
> > > waiting
> > > for the unmount would work when run directly from the shell, but
> > > not
> > > when run from a systemd service. I think it's working now (or
> > > nearly)
> > > but all contributions are welcome.
> > 
> > Well, I saw no difference running things from a shell or as a
> > service.  So, I can't comment.
> > 
> > Anyway, see the included tar.  As usual, mine is nfs mount.
> > 
> > The mount starts dock-down2.timer which runs once/minute.  You can
> > change that.
> > When unmount is noticed, the "touch" will signify it and the timer
> > will be stopped.
> > 
> > > 
> > > I attach the current version for comparison.
> > 
> > I really didn't look too much at it.  Seems like you are doing more
> > in the dock script than I thought
> > was needed.
> 
> I'll take a look. In the meantime, I've done some tests using
> inotifywait on the mounted directory (/raid) and it seems like the
> periodic checking for an active mount can be avoided.

Just to not leave this hanging: I've implemented the unmount detection
using "inotifywait -e unmount /raid", which does what I need without
using a polling loop.

There is currently an additional problem with the actually device
control, but I'll describe that in a separate thread.

Thanks again for your interest Ed.

poc
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux