PDA

View Full Version : [SOLVED] 9.10 - udev has changed AGAIN and not in release notes, need help!



anewguy
November 16th, 2009, 09:40 AM
It seems every release they change something with udev and don't document in the release notes. 9.10 turns out to be no different. Maybe for most users they never have to touch rules in udev, but some of us do. Another release, another change, another thing "broken":

As explained in previous posts, I have a need to set world access to a couple of USB devices. I won't explain here why and what it's about, as that has been gone through in the past and is not material to the question at hand. In 9.04 I had to make my rules file numbered in the 10's to override the normal rules in udev/rules.d . Apparently that's not the case in 9.10, or else I have some sort of syntax error (I didn't save my old file, but thought I remembered it quite simply as what follows). And they moved the default rules from /etc/udev/rules.d to /lib/udev/rules.d, yet according to the readme there you place your rules files that you want to have override default rules in /etc/udev/rules.d. Now this seems just plain silly - yes, maybe you want separation between the defaults delivered and user changes, but to have them in 2 separate root directories is just confusing. So, can anyone either tell me what is wrong with the following (I have both ways I thought it might work so I can test both at once), where the file has to be placed, and in what numerical sequence it belongs to as to override the default mounting of "odd" USB devices?



# ---------------------------------------------------------------------------------------------
# 10-cvscamera-rules.d
#
# Since the hacked CVS 1-time use camcorder and digital cameras are not normal USB devices,
# they normally get mounted as owned by root, making access by any other users impossible.
#
# The below rules trap the camcorder and the camera and give world access.
#
# anewguy 11.16.2009
#
# ---------------------------------------------------------------------------------------------
#
#
# Hacked CVS 1-time user digital camcorder
#
# SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="167b", ATTRS{idProduct}=="0101", MODE="0666"
ATTRS{idVendor}=="167b", ATTRS{idProduct}=="0101", MODE="0666"
#
#
# Hacked CVS 1-time use digital still camera
#
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="167b", ATTRS{idProduct}=="0101", MODE="0666"



Thanks in advance

Dave

anewguy
November 16th, 2009, 10:15 AM
Went back a ways to one of my posts about this in 9.04. Found there that the move to /lib/udev/rules.d happened then. Also found I had changed the syntax then to make it work. Changed my file, copied NOT to /etc/udev/rules.d but to /lib/udev/rules.d (according to readme I'm supposed to put it in /etc/udev/rules.d) as 41-xxxxxx -> THEN it worked.

Here's what it looks like now with the updated syntax:

# ---------------------------------------------------------------------------------------------
# 41-cvscamera.rules
#
# Since the hacked CVS 1-time use camcorder and digital cameras are not normal USB devices,
# they normally get mounted as owned by root, making access by any other users impossible.
#
# The below rules trap the camcorder and the camera and give world access.
#
# anewguy 11.16.2009
#
# ---------------------------------------------------------------------------------------------
#
#
# Hacked CVS 1-time user digital camcorder
#
SUBSYSTEMS=="usb" ATTRS{manufacturer}=="Pure Digital Inc." attrs{product}=="Saturn" MODE:="0666" SYMLINK+="cvs_camcorder"
#
#
# Hacked CVS 1-time use digital still camera
#
SUBSYSTEMS=="usb" ATTRS{manufacturer}=="SMaL" attrs{product}=="Digital Camera" MODE:="0666" SYMLINK+="cvs_still_camera"


Why productid and vendorid don't work anymore has never been explained to me.

Dave