devfs does not start on boot

I'm using avrdude to program an MCU. I have a USB programmer found at ugen4.2.

I can only use the programmer as root unless I run
Code:
/etc/rc.d/devfs start
After this is run I can use the programmer as a regular user fine.

Here is my devfs.conf and devfs.rules

Code:
> view /etc/devfs.rules 
[usb_devices=10]
add path 'usb/*' mode 0777 group usb
add path 'da*s*' mode 0660 group usb

[system=11]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups

Code:
> view /etc/devfs.rules
[snip]
perm da0s1 0666
perm usb/4.2.0 0777

I thought the rules were loaded on boot? Why is it only after start devfs as root that the programmer works for a normal user?

Cheers.
 
caesius said:
Code:
> view /etc/devfs.rules 
[usb_devices=10]
add path 'usb/*' mode 0777 group usb
add path 'da*s*' mode 0660 group usb

[system=11]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups

Code:
> view /etc/devfs.rules
[snip]
perm da0s1 0666
perm usb/4.2.0 0777

I thought the rules were loaded on boot? Why is it only after start devfs as root that the programmer works for a normal user?

The rules have to be specified in /etc/rc.conf. The section in brackets defines the name, so you probably should combine the two sets:
/etc/rc.conf
Code:
devfs_system_ruleset="localrules"

/etc/devfs.rules
Code:
[localrules=10]
add path 'usb/*' mode 0777 group usb
add path 'da*s*' mode 0660 group usb
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups

That said, devd(8) and /etc/devd.conf are more powerful, and IME, more reliable for dealing with dynamic devices.
 
Sorry forgot to mention that they *are* being loaded:
Code:
blackbox# vi /etc/rc.conf
[snip]
devfs_system_ruleset="usb_devices"
[snip]
devfs_system_ruleset="system"
[snip]

So why does my programmer only run after "starting" devfs?
 
caesius said:
Sorry forgot to mention that they *are* being loaded:
Code:
blackbox# vi /etc/rc.conf
[snip]
devfs_system_ruleset="usb_devices"
[snip]
devfs_system_ruleset="system"
[snip]

That only loads the "system" set. Those are just variable assignments, and the second overwrites the first.
 
Back
Top