something about udev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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=100,umask=002",
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"
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux