CUPS & devfs ruleset

Hi guys,

The documentation around CUPS and devfs is not enough dumb-proof.

Code:
cupsd_enable="YES"
devfs_system_ruleset="system"

However when I try to start the second:

Code:
doas service devfs start
/etc/rc.d/devfs: WARNING: devfs_set_ruleset: you must specify a ruleset number
/etc/rc.d/devfs: WARNING: devfs_apply_ruleset: you must specify a ruleset

Maybe instead of a word I must use a code, but I couldn't find any clear explanation about code meaning, or default codes:
Eventually it works even without setting devfs_system_ruleset="system"; maybe this section of the documentation must be updated or reviewed.

Thanks... 🙏
 
Andriy

Here you go...

Code:
cat /etc/devfs.rules
cat: /etc/devfs.rules: No such file or directory

ls /etc/ | grep devfs
devfs.conf

doas grep -E -R '\<system=' /etc
[nothing]

… 🤔

🤷‍♂️
 
The documentation around CUPS and devfs is not enough dumb-proof.

That document is outdated, actually you don't need to configure and enable any devfs rulesets. Cups in working with a pre-configured, automatically installed /usr/local/etc/devd/cups.conf. The only user action is to add the users to the "cups" group:
Rich (BB code):
# Allow members of group cups to access generic USB printer devices

notify 100 {
    match "system"        "USB";
    match "subsystem"    "INTERFACE";
    match "type"        "ATTACH";
    match "intclass"    "0x07";
    match "intsubclass"    "0x01";
    match "intprotocol"    "(0x01|0x02|0x03)";
    action "chgrp cups /dev/$cdev; chmod g+rw /dev/$cdev";
};

After plugging in a USB printer (note the "cups" owner and group):
Rich (BB code):
% usbconfig
ugen0.2: <SCX-3400 Series Samsung Electronics Co., Ltd> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)

% ls  -l  /dev/ugen0.2
lrwxr-xr-x  1 root wheel 9 Nov 10 11:45 /dev/ugen0.2 -> usb/0.2.0

% ls  -l  /dev/usb/0.2.0
crw-rw----  1 cups cups 0x90 Nov 10 11:45 /dev/usb/0.2.0


As for the devfs warning, no wonder service devfs start complains about
/etc/rc.d/devfs: WARNING: devfs_set_ruleset: you must specify a ruleset number

There is no devfs.rules file:
cat /etc/devfs.rules
cat: /etc/devfs.rules: No such file or directory
 
That should be mine reaction, not yours. You said that you followed the instructions when I asked you about devfs.rules.

😂

But I also stated that is not enough dumb proof. I'll double checked the instruction again and see if I missed something... 🤔
 
Back
Top