If /etc/ccd.conf is present, /etc/rc.d/ccd will run ccdconfig in the
early boot when only root is mounted read-only. On HAMMER systems (or
any other system where /boot isn't part of the root partition) it can
not automatically load ccd.ko at this point. This was different on
UFS where /boot was usually not separate.
So in case it fails, give the user a better message that explains the
options he has.
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2439>
Reported-by: Christer Solskogen
if (modfind("ccd") < 0) {
/* Not present in kernel, try loading it */
- if (kldload("ccd") < 0 || modfind("ccd") < 0)
- warn("ccd module not available!");
+ if (kldload("ccd") < 0 || modfind("ccd") < 0) {
+ warn("ccd module not available!\n"
+ "NOTE: Systems which don't have /boot as part of"
+ " the root partition\n"
+ " (as is the case with the default HAMMER"
+ " install) need to load ccd(4)\n"
+ " via /boot/loader.conf or compile it into"
+ " the kernel.");
+ }
}
switch (action) {