On Sun, 2011-07-24 at 21:53 +0300, Kevin Wilson wrote:
Hi,
Is there a way to disable automount of diskonkey on Fedora 15?
Whenever I insert diskOnKey, it is automounted. I want to avoid it.
How ?
rgs,
Kevin
Hi
I hack a new entry in /lib/udev/rules.d and call a script (sd_mount)
It has 4 parameters passed through.
device name, label, mount options, disk scheduler setting
There may be a better way.
In my case I do want to mount things but with particular mount options
I label my USB sticks (and eSATA[p] disks) and control the mount with
that label.
ja@skye ~ 2$ cat /lib/udev/rules.d/79-ja_test.rules
ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block",
ENV{ID_FS_LABEL}=="cssd2", RUN:="/usr/sbin/sd_mount %k $env{ID_FS_LABEL}
noatime,discard noop", OPTIONS+="last_rule"
ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block",
ENV{ID_FS_LABEL}=="cssd4", RUN:="/usr/sbin/sd_mount %k $env{ID_FS_LABEL}
noatime,discard noop", OPTIONS+="last_rule"
ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block",
ENV{ID_FS_LABEL}=="cb1", RUN:="/usr/sbin/sd_mount %k $env{ID_FS_LABEL}
noatime noop", OPTIONS+="last_rule"
ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block",
ENV{ID_FS_LABEL}=="cb2", RUN:="/usr/sbin/sd_mount %k $env{ID_FS_LABEL}
noatime noop", OPTIONS+="last_rule"
In your case you need to do nothing
However the OPTIONS+="last_rule" should ensure no other rules
will interfere. (provided the rule is executed first!)
My 79 in 79-ja_test.rules determines when it is used and works for me!
Hope this helps
John