* something about udev
@ 2010-11-27 10:23 shaoning
0 siblings, 0 replies; only message in thread
From: shaoning @ 2010-11-27 10:23 UTC (permalink / raw)
To: linux-hotplug
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"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-27 10:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-27 10:23 something about udev shaoning
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).