Re: how to change udev rules in Fedora

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

 



Ed Greshko <Ed.Greshko@xxxxxxxxxxx> writes:

> On 07/17/13 12:32, lee wrote:
>> Joe Zeff <joe@xxxxxxx> writes:
>>
>>> On 07/16/2013 08:39 PM, lee wrote:
>>>> Thank you!  So I'll just copy the file I want to modify into
>>>> /etc/udev/rules.d/  and delete everything I don't want to modify, that
>>>> should work ...
>>> Please let us know how this works.  I'm sure that there are others on
>>> this list who could take advantage of the information.
>> This won't work because when I delete everything else from the copy of
>> the file and leave only what I want, it would mean that everything I
>> might want will not be in effect because my copy of the file would
>> wholly replace the file provided as default.
>>
>> So I can't do this.
>>
>
> Then try this.....
>
> Make a new file with a new name in /etc/udev/rules.d with only your
> specific rules?

Which rules do I need to make for what I'm trying to achieve?

> So, to me, the question would be what is more appropriate.
> 10-mystuff.rules or 99-mystuff.rules.

The man page of udev says:


,----
| All rules files are collectively sorted and processed in lexical
| order, regardless of the directories in which they live.
`----


Something like 'zzzz-blah.rule' might be executed last.  Since file
names can contain all kinds of characters and there isn't any way to
close this security hole, like by limiting the characters allowed in
file names, the rule would have to have an unlimited number of whatever
character no. 65535 is as its file name.


So now I have made
/etc/udev/rules.d/zzzz-yun-disable-media-polling.rules:


# disable in-kernel media-presence polling
ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_poll_msecs}!="0", ATTR{parameters/events_dfl_poll_msecs}="0"


I don't know if this is a good idea.  If some software wants to poll
some block device now, it could do so nonetheless and might employ a
worse way of doing it.  OTOH, I don't see any reason why devices should
be polled every 2 seconds like the default rule specifies.  Why would
anyone want that??

How do I apply this rule?  Can udev be somehow restarted?


There is another problem with this:  My new rule doesn't disable a
default one, it merely overrides the default one.  That probably works
in this case, but there's also /usr/lib/udev/rules.d/80-udisks.rules
which has:


# Check if a disk is ATA SMART capable
#

# USB ATA enclosures with a SAT layer
KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="usb", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"

# ATA disks driven by libata
KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="ata", ENV{DEVTYPE}=="disk", IMPORT{program}="udisks-probe-ata-smart $tempnode"

# ATA disks connected via SAS (not driven by libata)
KERNEL=="sd*[!0-9]", ATTR{removable}=="0", ENV{ID_BUS}=="scsi", ENV{DEVTYPE}=="disk", ENV{ID_VENDOR}=="ATA", IMPORT{program}="udisks-probe-ata-smart $tempnode"


If this is what I want to disable, how would I do that?


-- 
Fedora release 19 (Schrödinger’s Cat)
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux