devfs ignores pass0 entry at boot time
olli at lurza.secnetix.de
Mon Mar 10 16:39:44 UTC 2008
Mark Nowiasz wrote:
> Hah - I've found the bug!
> devfs.rules has to end with an empty line,
No. It has to end with a newline, because it is a
In UNIX, a valid text file is a concatenation of zero
or more lines, where each line *must* end with a newline,
including the last line. If it doesn't, then it's not
a valid text file, leading to undefined behaviour.
For example, wc(1) doesn't count the last line if it's
not properly terminated. Also, a shell loop (like
"while read line; do") will skip such illegal lines.
On the other hand, some tools accept such lines, and
some even silently add a newline if one is missing
(e.g. "sed <invalid >valid" will add the missing newline).
You should always make valid text files, so you can be
sure that there won't be any problems.
If you use a standard UNIX text editor such as ed or vi
to create and edit text files, they will automatically
make sure that every line is properly terminated, so
there won't be any problem.
> An entry like
> add path 'pass*' mode 660 group wheel user mark<EOF>
> will be ignored, whereas
> add path 'pass*' mode 660 group wheel user mark\n
> will be honoured.
> Well, this bug should be easy to fix
There is no bug. I would expect the above behaviour.
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
More information about the freebsd-stable