||03-12-2013 06:53 PM
How does one change a system udev rule permanently?
I'm running Fedora 18 and the udev rule /usr/lib/udev/rules.d/60-cdrom_id.rules has a "feature" in it that prevents me from disabling the hardware button on my cdrom drive (ordinarily I would do so using 'eject -i 1'). My toddler keeps pressing my eject button and driving me crazy.
I can edit the file and change it so eject behaves correctly but there's a big warning at the top of the file that says "do not edit this file, it will be overwritten on update." I have noticed that it has indeed been overwritten a few times with updates and I get bugged with going in and fixing it all the time.
If one isn't supposed to edit the files in /usr/lib/udev/rules.d by hand, where is it that one can modify what gets written to them?
Alternate solutions would be great as well. At present my top idea is to keep a copy of the file (edited) around somewhere and have a cron job overwrite the version in /usr/lib/udev/rules.d periodically. Not very elegant.