linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: shaoning <shaoning.fan@gmail.com>
To: linux-hotplug@vger.kernel.org
Subject: something about udev
Date: Sat, 27 Nov 2010 10:23:33 +0000	[thread overview]
Message-ID: <AANLkTinaT41wn83wkY1reOnr7J-cFhFAWG1wonBr_8=4@mail.gmail.com> (raw)

hi all

there is a simple question about udev, does anybody can help me ?

I wan to auto mount ntfs partition , and using nautilus auto open the
url when it mounted.
But why the nautilus can not show to me , the ntfs partition auto
mount to the /media dirctory?
it seems that  only the last RUN+ part can not work . It confused me.
So, does anyone know the reason ? Thanks!

Below is my test rules :


KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# # Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}="", ENV{dir_name}="usbhd-%k"
# # Global mount options
ACTION="add", ENV{mount_options}="relatime"
# # Filesystem-specific mount options
ACTION="add", ENV{ID_FS_TYPE}="ntfs",
ENV{mount_options}="$env{mount_options},utf8,gid\x100,umask\02",
RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -t ntfs-3g
-o $env{mount_options} /dev/%k
/media/%E{dir_name}",RUN+="/usr/bin/nautilus media/%E{dir_name}"
# # Clean up after removal
ACTION="remove", ENV{dir_name}!="", RUN+="/bin/umount -l
/media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"
# # Exit
LABEL="media_by_label_auto_mount_end"

                 reply	other threads:[~2010-11-27 10:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='AANLkTinaT41wn83wkY1reOnr7J-cFhFAWG1wonBr_8=4@mail.gmail.com' \
    --to=shaoning.fan@gmail.com \
    --cc=linux-hotplug@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).