[systemd-devel] How to automount

Paul D. DeRocco pderocco at ix.netcom.com
Mon Sep 21 13:10:33 PDT 2015


> 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



More information about the systemd-devel mailing list