[yocto] [systemd-devel] How to automount

Fred Ollinger Fred.Ollinger at seescan.com
Tue Sep 22 11:33:43 PDT 2015


This is in the package: udev-extraconf

On your system look here:

/etc/udev/rules.d/automount.rules

In this file, you'll find the following rules.

The second one auto unmounts.

SUBSYSTEM=="block", ACTION=="add"    RUN+="/etc/udev/scripts/mount.sh"

SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"

SUBSYSTEM=="block", ACTION=="change", 
ENV{DISK_MEDIA_CHANGE}=="1" RUN+="/etc/udev/scripts/mount.sh"

________________________________________
From: yocto-bounces at yoctoproject.org <yocto-bounces at yoctoproject.org> on behalf of Paul D. DeRocco <pderocco at ix.netcom.com>
Sent: Tuesday, September 22, 2015 10:45 AM
To: 'Mantas Mikulenas'; yocto at yoctoproject.org
Subject: Re: [yocto] [systemd-devel] How to automount

> From: Mantas Mikulenas [mailto:grawity at gmail.com]
>
> > 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.

If creating a udev mount rule automatically does the unmount, then the
simplest thing for me would probably be to do that, and have my
application do a sync after each user-initiated operation. That way, the
drive would remain mounted after the operation, so I could still poke
around on it while debugging, yet there would be no corruption when it's
removed. Thanks for the tip.

--

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at ix.netcom.com

--
_______________________________________________
yocto mailing list
yocto at yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


More information about the yocto mailing list