LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   udev+hotplug+2.6.6=questions (http://www.linuxquestions.org/questions/slackware-14/udev-hotplug-2-6-6%3Dquestions-186740/)

shilo 05-27-2004 09:09 PM

udev+hotplug+2.6.6=questions
 
I recently moved over to udev and things went pretty smoothly. I do have a few questions, though and was wondering if anyone could offer some help.

My scanner will only seem to work for root. This is a permissions problem. To get the scanner to work for everyone, I need to adjust the permissions. If I change the file /proc/bus/usb/002/002 to give more permissions with the command.
Code:

chmod 777 /proc/bus/usb/002/002
The scanner will work. I'm sure that I can get away with more restrictive permissions, but I'll experiment with that later. The problem is that when I re-boot, the permissions for /proc/bus/usb/002/002 revert back to 644.

Now I could change the permissions every time I want to use the scanner. I could even add to /etc/rc.d/rc.local to make the change happen after every reboot. My guess is that this is probably not the correct way to go about it. What is the recommended method?

My second question is very similar. Using udev, the /dev directory is automatically populated at boot time. I have a dvd-rom and a cd-rw. The dvd-rom is /dev/hdd and the cd-rw is /dev/hdc. Two symlinks are made when I re-boot, /dev/dvd and /dev/cdrom. Both point to /dev/hdd. I would like /dev/cdrom to point to /dev/hdc. Of course, I can manually change the link or add to /etc/rc.d/rc.local to acheive this, but once again I don't think that this is the preferred method. Any ideas on this.

As a side note, moving on to udev has been pretty smooth. Had to change my fstab a bit as some of the symlinks I was using aren't created. Had to add audio, video, and cdrom groups to /etc/groups. SWareT helped out with that. Had to add users to the appropriate groups to get everything running smooth. The only issue that I currently have, other than those listed, is that when I mount /dev/hdc or /dev/hdd, they appear on my desktop as hard drives and not optical devices. Any ideas on fixing that would be great, too.

Thanks in advance for your help,

shilo 05-31-2004 05:05 PM

Anyboby?

keefaz 05-31-2004 05:30 PM

/proc is virtual file system, it does not exists physically in the drive, that's why the permission are reset after reboot. I have no idea to set permissions without a script like rc.local, sorry :(

lems 05-31-2004 05:36 PM

Regarding your DVD/CD-ROM question:
Code:

BUS="ide", KERNEL="hdc", NAME="%k", SYMLINK="cdrom cdroms/cdrom%n"
BUS="ide", KERNEL="hdd", NAME="%k", SYMLINK="dvd cdroms/cdrom%n"

Save this in /etc/udev/rules.d/10-local.rules
(Taken from Writing udev rules)

Your scanner problem is something which bothers me as well.
In the sane-usb manpage I found this:
Code:

none /proc/bus/usb usbfs defaults,devmode=0666  0  0
Unfortunately, this doesn't work for me..

shilo 05-31-2004 08:43 PM

Thanks Lems. I'll try it out & let you know how it goes.


All times are GMT -5. The time now is 09:04 PM.