Ken Moffat wrote:
On Thu, Feb 12, 2015 at 01:28:00AM +0000, Ken Moffat wrote:
On Wed, Feb 11, 2015 at 02:35:31PM -0600, Bruce Dubbs wrote:
I suspect it would be be more proper to use
sed '1d;/SYMLINK.*cdrom/ a\
KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", \
SYMLINK+="dvd", OPTIONS+="link_priority=-100"' \
/lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules
The place to override system rules is /etc/udev/rules.d/.
I was only noting what works for me. I do not recall our users
complaining that they were having difficulty playing DVDs. Maybe
people today just download.
OTOH, I suppose that making it easier for people is a good thing.
OK, I've now got a 7.7 system built up to the point that I can test
applications. I assume that the blank line was "let's see if ken is
paying attention" - I noticed it, but decided to try it anyway.
Failed, of course.
If you haven't noticed, I'm not a great typist. Please don't assume I'm doing
anything subtle. However I thought the sed would have just added the blank
line. I guess what I intended was:
sed '1d;/SYMLINK.*cdrom/ a\
\
KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", \
SYMLINK+="dvd", OPTIONS+="link_priority=-100"' \
/lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules
So I took out the blank line, and got an error when I booted - udev
did not like it, SYMLINK was on a new line, without any
continuation.
I then spent some time trying to get multiple backslashes to work,
but without any success - \\ caused sed to barf on the S of SYMLINK,
using \\\ left sed waiting for something to be completed.
So in the end I'm using
sed '1d;/SYMLINK.*cdrom/ a\
KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd",
OPTIONS+="link_priority=-100"' \
/lib/udev/rules.d/60-cdrom_id.rules >/etc/udev/rules.d/60-cdrom_id.rules
I like this better than my version. What I was trying ot do was to keep the
line lengths a little shorter.
Works with xine using /dev/dvd.
Still not convinced if this is worth putting in the book, google
should be able to find it here :)
ĸen - currently playing a DVD with vlc - that was already set to use
/dev/sr0, but for me this is worth noting because it's the first
time I've ever been able to play a DVD in vlc without it stuttering.
No idea what changed, hope it will be the same on my other machines.
I'm glad there is an improvement there. At some time I'll take a look at the
continuation lines in udev rules.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page