From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
Description of problem:
Acording to every page I've ever seen, the command "grep
^raiddev /etc/raidtab" should return lines where the characters "raiddev"
are the first non-whitespace characters on the line. However, grep 2.4.2
has a bug that is forcing that command to return null unless there is NO
whitespace before the search string. Because it return only strings with
NO whitespace on the line before the characters, the inittab scripts
assume no raid devices need to be started unless they begin on column 1.
However, if there ARE raid devices to be started, they will not mount
because they were not started. For the time being I have fixed this
(somewhat) by removing the ^ from the grep line for raiddev. This works
(albeit it is an ugly fix). Until the GNU/FSF guys get that bug fixed, it
would be wise to include some kind of a work around.
Steps to Reproduce:
1. grep raiddev /etc/raidtab
(returns " raiddev /dev/md0")
2. grep ^raiddev /etc/raidtab
3. grep ^/dev /etc/fstab
(returns all lines with /dev as the first four characters on that line)
Actual Results: as described above.
Expected Results: grep on raidtab with ^raiddev should work,
returning raiddev /dev/md0
Bug reported on GNU bug tracking site.
Changed in 6.12-1 to "^[^#]*raiddev", which should work.
FWIW, it seems grep is using the right behavior here.