[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Monolithic kernels and init scripts



On Sun, Dec 03, 2000 at 09:36:03PM +0100, scr wrote:
> 
> It looks like (I haven´t digged deeply) those scripts
> `modutils´ and `kerneld´ from /etc/init.d are responsible
> for several warnings I get during boot of a hand-rolled
> kernel (I think it´s kernel-source from plain potato,
> although I have "unofficial" CDs).
> 
> Well, I get several warnings because
> modules are not implemented at all
>    *and*
> kerneld gets started
> although I don´t need all this stuff (I think).
> 
> Is there a mistake in those /etc/inid.d scripts?
> Shouldn´t a "autodetection" if booted from a monolithic
> kernel be built into them?
> Well, I could remove some scripts/symlinks, but then
> a modularized kernel wouldn´t boot, right?

its true that the tests used in the kerneld initscript is flawed,
it checks for /proc/sys/kernel/modprobe which will not exist in
two cases:

1) your running 2.0 kernels, and thus need kerneld
2) your running 2.2 without loadable module support.

the flawed assumption here is that nobody will ever build a kernel not
supporting modules.  you can however delete or disable the kerneld
script entirely without any problems since its only relevent for 2.0
kernels, so long as you don't plan to run 2.0 kernels you will never
need kenreld

i don't see any problems with the modutils script, it should abort if
/proc/modules is missing which should only occur for kernels without
module support.  

here is a patch for /etc/init.d/kerneld:

--- /etc/init.d/kerneld Sat Oct 21 13:36:39 2000
+++ /tmp/kerneld        Mon Dec  4 01:38:12 2000
@@ -5,7 +5,15 @@

 KDOPT=""

-test -f /proc/sys/kernel/modprobe && exit 0
+# kerneld only works on 2.0 kernels
+case `uname -r` in
+    2.0.*)
+    ;;
+    *)
+    exit 0
+    ;;
+esac
+
 test -f /proc/modules || exit 0
 test -f /sbin/kerneld || exit 0

feel free to file a bug against modutils with this patch. 

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpKHcBNpMm4m.pgp
Description: PGP signature


Reply to: