Re: kerneld message / Workaround
On Tue, Jul 18, 2000 at 01:05:42PM +0300, Pavel M. Penev wrote:
>
>
> On Mon, 17 Jul 2000, brian moore wrote:
>
> > On Sat, Jul 15, 2000 at 11:51:06AM +0100, Jonathan Heaney wrote:
> > > David Wright wrote:
> > > > The scripts /etc/init.d/{kerneld,modutils} have to be able to handle
> > > > both 2.0 and 2.2 kernels with kerneld or kmod. You will see they do
> > > > this by testing for the presence of /proc/sys/kernel/modprobe which
> > > > only exists under 2.2.
> >
> > But doesn't -always- exist on 2.2:
> >
> > [narvi:/etc/init.d] 11:26:37am 136 % ls -l /proc/sys/kernel/modprobe
> > ls: /proc/sys/kernel/modprobe: No such file or directory
> > [narvi:/etc/init.d] 11:26:39am 137 % uname -a
> > Linux narvi 2.2.16 #6 Fri Jun 23 13:51:08 PDT 2000 i686 unknown
> >
> > You need to have 'CONFIG_KMOD' set in your kernel build to have it,
> > which I don't.
> >
> > Seems to me that the logic on that is broken. /proc/sys/kernel/modprobe
> > is not a good way to determine whether kerneld should be run.
>
> What I think is that you are wrong.
Well, you're allowed your own opinions, even if they are boneheaded and
not backed up by facts.
> If you have compiled your kernel with
> 'CONFIG_KMOD' defined, then you would have kmod built into your
> kernel. "kmod" is a REPLACEMENT for kerneld, remember?
Yes, and 'kerneld' is for 2.0, -NOT- 2.2.
| WARNING
| kerneld is obsolete as of Linux kernel 2.1.90, it was
| replaced by the kmod kernel thread and cron entries. Do
| not even think of using kerneld unless you are running a
| 2.0 kernel.
See that? It says DO NOT run kerneld on anything but 2.0. NOT. BAD.
Got it?
Now, the logic in /etc/init.d/kerneld -WILL- run it if you build a 2.2
(remember that number?) kernel with 'CONFIG_KMOD' undefined. See, in
that case, /proc/sys/kernel/modprobe will NOT exist, which is how
/etc/init.d/kerneld determines the version of your kernel.
Go check the source. The /proc entry for sys/kernel/modprobe is in
kernel/sysctl.c:
#ifdef CONFIG_KMOD
{KERN_MODPROBE, "modprobe", &modprobe_path, 256,
0644, NULL, &proc_dostring, &sysctl_string },
#endif
See the #ifdef? Yep, /proc/sys/kernel/modprobe only exists if KMOD is
defined.
> > Perhaps you should file a bug on it?
>
> Don't be that fast.
Why not? A bug is a bug. 'man kerneld' is quite clear that kerneld
should -not- be run on a 2.2 kernel. Yet /etc/init.d/kerneld is quite
happy to run it on a 2.2 kernel because it uses an incorrect method for
testing the version of the kernel.
Why is that not a bug?
--
Brian Moore | Of course vi is God's editor.
Sysadmin, C/Perl Hacker | If He used Emacs, He'd still be waiting
Usenet Vandal | for it to load on the seventh day.
Netscum, Bane of Elves.
Reply to: