From: Aaron Lewis <the.warl0ck.1989@gmail.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Auto Mounting when file accessed?
Date: Thu, 13 Jan 2011 16:22:17 +0800 [thread overview]
Message-ID: <4D2EB639.7010506@gmail.com> (raw)
In-Reply-To: <20110113011417.GD4513@localhost2.local>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I didn't follow this thread , but if you just want an simple device
auto-mounter and un-mounter , you should try out kernel auto mounter
rather than a simple script.
On 01/13/2011 09:14 AM, Roger wrote:
>> 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.
>
- --
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E ( http://keyserver.veridis.com )
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJNLrY5AAoJECSSp9Df5sKeD/4P/j5I3a1/ACIV9CAl69U4QFoz
z3PwQGOnNtky6lCMHeZllymcBdt7S5Mz8fTuDf6IKt9uygjO49fjphVCXDcpIVg8
lZyJ0+cmWjOADIwgXmUzEQn3llYOcUFd03lo6HQ2w9katnoPGENZR735QDmT5HVi
K+IXiaEj+golmKdl1Q+RAqBfmYpIJzvLS9QO294Dus5b3dS6UoVWbzy1LQRvvj9R
+Af3LthvWcxF17rwUJUuhL8D2B2UqfPYf+gSinCh700BaK3Q7ej71h6u03I0bqpk
GpBXemNp1BiliEsrZXpqjBYwbMSd5Q7KSGRXB4RU8Q1k/hWbqiW1gZf4gDscE1Gq
zV3oYg7vZ1fhbfXyTjJ7nD2cUwzCDOFILR1aaT40CBuaQzv5rUyajgCbYaxehXtv
3WRWg333DDJdDWClw0ztXBmTzv0uKsNTVJysgwVQK65VeUiZv/hPK59FbrZZohBI
GGe9QeDQoDXs/Q6+P9LIJQuBgBeNWZfNp61QR0Yyh2mlwaRgjKriVSdZQ+M0WSus
AArpQILdcZbixXhQyqmNMQt8ATqsRDq3YrIg8gG5EaGrQI4UXDddLINcBCMv9wYU
/2OziNznhd4WS4TcniQG7ispALih2UX48237GnxLVY5u4586z2v4ib+gOX4pgJEl
Ps2v3jp2kGQkkSOAor1+
=FOmr
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2011-01-13 8:22 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
2011-01-13 8:22 ` Aaron Lewis [this message]
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=4D2EB639.7010506@gmail.com \
--to=the.warl0ck.1989@gmail.com \
--cc=dm-crypt@saout.de \
/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.