All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fred Ollinger <Fred.Ollinger@seescan.com>
To: "Paul D. DeRocco" <pderocco@ix.netcom.com>,
	'Mantas Mikulenas' <grawity@gmail.com>,
	"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: [systemd-devel] How to automount
Date: Tue, 22 Sep 2015 18:33:43 +0000	[thread overview]
Message-ID: <1442946736651.15866@seescan.com> (raw)
In-Reply-To: <DEEBEF6233F54A17BB00A9E93D0A54EC@PAULD>

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

> From: Mantas Mikulenas [mailto:grawity@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@ix.netcom.com

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

  reply	other threads:[~2015-09-22 18:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <F9B37C5086864E2EA06AC70C09CF7C25@PAULD>
     [not found] ` <CAFKnvs6eVMrfcH3AOS28vAG237UUbYdLKR=FGB9PBipOQZbqYg@mail.gmail.com>
     [not found]   ` <3DB96F2F9D444EFE931CA8443BAFBACE@PAULD>
     [not found]     ` <CAPWNY8XTWDDS83JwizV8jH=xkxs9hdRgBLB5CsacTYQsqCwG=Q@mail.gmail.com>
2015-09-22 17:45       ` [systemd-devel] How to automount Paul D. DeRocco
2015-09-22 18:33         ` Fred Ollinger [this message]
2015-09-22 19:55           ` Daniel.
2015-09-22 23:42           ` Paul D. DeRocco
2015-09-22 23:49             ` Fred Ollinger
2015-09-23  0:22               ` Paul D. DeRocco
2015-09-23  0:30               ` Daniel.
2015-09-23  1:20                 ` Paul D. DeRocco
2015-09-23  2:34                   ` Daniel.
2015-09-23  7:20           ` Mike Looijmans
2015-09-23  8:30             ` Paul D. DeRocco
2015-09-23 10:09               ` Daniel.
2015-09-23 18:31                 ` Paul D. DeRocco
2015-09-23 19:28                   ` Daniel.
2015-09-24 10:55                 ` Mike Looijmans
2015-09-24  6:04 Johannes Pointner
2015-09-24 10:58 ` Mike Looijmans
  -- strict thread matches above, loose matches on Subject: below --
2015-09-24 11:25 Johannes Pointner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442946736651.15866@seescan.com \
    --to=fred.ollinger@seescan.com \
    --cc=grawity@gmail.com \
    --cc=pderocco@ix.netcom.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.