[systemd-devel] How to automount

Mantas Mikulėnas grawity at gmail.com
Mon Sep 21 21:09:56 PDT 2015


> I don't think there's any way to have
something auto-unmount

There certainly is – udev has been unmounting unplugged drives for many
years. It's done by default.

On Mon, Sep 21, 2015, 23:10 Paul D. DeRocco <pderocco at ix.netcom.com> wrote:

> > From: Umut Tezduyar Lindskog [mailto:umut at tezduyar.com]
> >
> > I am not sure if automount is really the right way to go. In the end,
> > your automount path will fail if your device is not plugged in.
>
> A little experimenting showed you're right.
>
> > You could always use udev rules (ENV{SYSTEMD_WANTS}='media-ext.mount')
> > to mount the volume.
> > http://www.freedesktop.org/software/systemd/man/systemd.device.html
>
> I was thinking about udev, too, but I don't think there's any way to have
> something auto-unmount. But I'm overcomplicating things. In my system, the
> only accesses made to this external flash drive are in response to a user
> command. So the simpler solution is just to have my application mount and
> unmount the drive, instead of trying to get the operating system to do it.
>
> --
>
> Ciao,               Paul D. DeRocco
> Paul                mailto:pderocco at ix.netcom.com
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150922/77ad7e69/attachment.html>


More information about the systemd-devel mailing list