Date: Thu, 14 Nov 2019 17:23:49 +0100 From: Per Hedeland <per@hedeland.org> To: B J <va6bmj@gmail.com> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: Strange devfs Warnings Message-ID: <1225849c-78d0-8ab9-2092-8565d80f84cf@hedeland.org> In-Reply-To: <CAP7QzkO0F0n7jYTqER-PNjaACjNd0ZYF1BmANoUpTrD6a-3W0w@mail.gmail.com> References: <CAP7QzkO0F0n7jYTqER-PNjaACjNd0ZYF1BmANoUpTrD6a-3W0w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-11-14 15:56, B J wrote: > I have a laptop machine that's giving me some strange warnings about devfs. > > When I installed the version of FreeBSD that runs on it, as well as > Xfce as the desktop, I edited /etc/devfs.rules with: > > [localrules = 5] The spaces around '=' here are causing the "you must specify ..." warnings. devfs.rules(5) says: In the brackets should be the name of the ruleset and its number, separated by an equal sign. > add path 'da*' mode 0600 group operator > > and added this to /etc/rc.conf: > > devfs_system_ruleset="localrules" > > (I started doing this several years ago with an earlier version of > FreeBSD with Gnome 2 as the desktop so that I could mount USB drives.) > > I get the following while booting the machine: > > /etc/rc.d/devfs: WARNING: devfs_init_rulesets: could not read rules > from /etc/defaults/devfs.rules Hm, /etc/defaults/devfs.rules is only readable by root: -rw------- 1 root wheel 2466 Dec 7 2018 /etc/defaults/devfs.rules - but surely /etc/rc.d/devfs is run as root when you boot... - strange. FWIW, I have (on 12.0-RELEASE) a similar setup (as do probably many others, since it's basically the man page example), and while I can verify the breakage from spaces around '=', i don't get any warning about /etc/defaults/devfs.rules. Do you actually have that file? > /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 > > I'm not sure what's going on and what I should do to fix this. The > reason I'm asking is that I want to set up that laptop machine to run > a scanner and a printer and I believe I have to edit /etc/devfs.rules > for that. Well, you *may* need something in /etc/devfs.rules, but I doubt that it is what you currently have there. /dev/da* is for SCSI devices (see da(4)), and perhaps (but not likely) your scanner and printer present themselves as such - but as far as I can see, the only effect of your line would be to remove group read access, since the default permissions are: crw-r----- 1 root operator 0x9a Oct 2 02:47 /dev/da0 crw-r----- 1 root operator 0x9b Oct 2 02:47 /dev/da0s1 Back when I had a USB-connected printer/scanner combo, I used add path 'usb/*' mode 666 - a bit "lax", but it was OK for my purposes. If you print/scan over the network (as I do these days), you don't need anything there. --Per Hedeland
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1225849c-78d0-8ab9-2092-8565d80f84cf>