All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger <rogerx@acsalaska.net>
To: Ma Begaj <derliebegott@gmail.com>
Cc: dm-crypt@saout.de, Roger <rogerx.oss@gmail.com>
Subject: Re: [dm-crypt] Auto Mounting when file accessed?
Date: Wed, 12 Jan 2011 16:14:17 -0900	[thread overview]
Message-ID: <20110113011417.GD4513@localhost2.local> (raw)
In-Reply-To: <AANLkTinczJA-G3E8AK_aRNTdeDm4EHo7bX=T4cO0=s=L@mail.gmail.com>

>On Wed, Jan 12, 2011 at 10:05:00PM +0100, Ma Begaj wrote:
>
>inotify-tools could probably help you... something like this could
>work, i think;
>
>------------------------------------
>#!/bin/sh
>
># watch for folders
>inotifywait -m -r --format "%e %w%f" /mnt/crypt | while read event file; do
>
>    # and mount if not mounted
>    if ! df | grep /mnt/crypt >/dev/null ; then
>        mount /mnt/crypt
>    fi
>done
>------------------------------------


Oh, and one more big thing, a user can use:

vi /mnt/crypt/blah.txt, and vi will still open a file even though mounting has
been called for.  Same goes for any other command used on /mnt/crypt before
it's mounted.

And I think this is where dbus/udev would step in and hold or wait command and
mount before proceeding with the command on the filesystem.

-- 
Roger
http://rogerx.freeshell.org/

  parent reply	other threads:[~2011-01-13  1:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12  5:34 [dm-crypt] Auto Mounting when file accessed? Roger
2011-01-12 21:05 ` Ma Begaj
2011-01-13  0:57   ` Roger
2011-01-13  1:14   ` Roger [this message]
2011-01-13  8:22     ` Aaron Lewis
2011-01-13  9:39       ` Roger
2011-01-13 10:00         ` Roger
2011-01-13 18:25           ` Arno Wagner
2011-01-14  9:12           ` Ma Begaj
2011-01-12 23:13 ` Arno Wagner

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=20110113011417.GD4513@localhost2.local \
    --to=rogerx@acsalaska.net \
    --cc=derliebegott@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=rogerx.oss@gmail.com \
    /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.