Debian bug report logs - #1017
Kernel Module Errors on Upgrade

Package: modules; Reported by: grantbow@netcom.com (Grant R. Bowman); 136 days old.
Bug reassigned from package `base' to `modules'. Request was from imurdock@debian.org (Ian Murdock) to debian-bugs-request@pixar.com. Full text available.

Message received at debian-bugs:


From kryten.it.com.au!andrew Sun Jun 18 00:28:03 1995
Return-Path: <andrew@kryten.it.com.au>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sNEm2-0005OQC; Sun, 18 Jun 95 00:28 PDT
Received: from kryten.it.com.au by pixar.com with SMTP id AA07909
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 18 Jun 1995 00:26:29 -0700
Received: by kryten.it.com.au
	id <m0sNDWV-000Ad3C@kryten.it.com.au>
	(Debian /\oo/\ Smail3.1.29.1 #29.32); Sun, 18 Jun 95 14:07 WST
Message-Id: <m0sNDWV-000Ad3C@kryten.it.com.au>
From: andrew@kryten.it.com.au (Andrew Howell)
Subject: Re: Bug#1017: Kernel Module Errors on Upgrade
To: grantbow@netcom.com, debian-bugs@pixar.com
Date: Sun, 18 Jun 1995 14:07:50 +0800 (WST)
In-Reply-To: <v02120d02ac091e84acc5@[192.0.2.1]> from "Grant R. Bowman" at Jun 17, 95 05:14:44 pm
X-Mailer: ELM [version 2.4 PL24 PGP2]
Content-Type: text
Content-Length: 1176      

> >16      If [ $modules ]; then
> >17        depmod -a
> >18      fi
> >
> >instead of just:
> >
> >16      depmod -a
> 
> Well, this isn't a complete fix.  I didn't test with modues using the 1.2.1
> kernel after my change.  I just ran that test, and despite (I think) it
> works, it outputs this now:
> 
> Calculating dependencies... /etc/init.d/modules: [: too many arguments
> done.
> 
> And then loads the individual modules with /sbin/insmod lines.
> 
> So this modification would work if [$modules] would work, but modules is a
> list, not a text string, so it complains.  So how can I evaluate to 0 if
> there are 0 elements, but one otherwise?

Try if [ ! -z $modules ]; then

Or if all else fails, read the man page of bash.

Andrew

-----------------------------------------------------------------------
Dehydration - 34%, Recollection of previous evening - 2%, embarrassment
factor - 91%.  Advise repair schedule:- off line for 36 hours, re-boot
startup disk, and replace head - wow, what a night!
                -- Kryten in Red Dwarf `The Last Day'

Andrew Howell				               andrew@it.com.au 
Perth, Western Australia		      howellaa@cs.curtin.edu.au 

Acknowledgement sent to andrew@kryten.it.com.au (Andrew Howell):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1017; Package base. Full text available.

Message received at debian-bugs:


From netcom.com!grantbow Sat Jun 17 23:34:43 1995
Return-Path: <grantbow@netcom.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sNDwR-0005z9C; Sat, 17 Jun 95 23:34 PDT
Received: from netcom13.netcom.com by pixar.com with SMTP id AA05338
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 17 Jun 1995 23:33:14 -0700
Received: from [192.0.2.1] by netcom13.netcom.com (8.6.12/Netcom)
	id XAA05279; Sat, 17 Jun 1995 23:33:53 -0700
X-Sender: grantbow@netcom13.netcom.com
Message-Id: <v02120d02ac0978805ae5@[192.0.2.1]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sat, 17 Jun 1995 23:33:08 -0700
To: debian-bugs@pixar.com
From: grantbow@netcom.com (Grant R. Bowman)
Subject: Re: Bug#1017: Kernel Module Errors on Upgrade

At 5:14 PM 6/17/95, Grant R. Bowman wrote:
>At 1:39 PM 6/17/95, Grant R. Bowman wrote:
>>This is the bug part
>>--------------------
>>This error appeared when I upgraded by kernel.  I suggest that the file
>>'/etc/init.d/modules' have an if statement added to skip over the error
>>message if no modules are detected instead of giving the error that it
>>does.  Actually, the only error is the 'depmod -a' line I think, so I
>>changed it to
>>
>>16      If [ $modules ]; then
>>17        depmod -a
>>18      fi
>>
>>instead of just:
>>
>>16      depmod -a

I should work at these a bit more before I start flooding lists with
e-mail.  I found a solution that works with loadable and non-loadable
kernels.  Here it is:

16      If [ -z modules ]; then
17        depmod -a
18      fi

I'll keep this one short for a change.

Regards,

--
-- Grant R. Bowman                                AdvoTech
-- <grantbow@netcom.com>         Computer and Software Asset Manaagement



Acknowledgement sent to grantbow@netcom.com (Grant R. Bowman):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1017; Package base. Full text available.

Message received at debian-bugs:


From netcom.com!grantbow Sat Jun 17 17:16:18 1995
Return-Path: <grantbow@netcom.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sN82D-0007ngC; Sat, 17 Jun 95 17:16 PDT
Received: from netcom13.netcom.com by pixar.com with SMTP id AA20933
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 17 Jun 1995 17:14:49 -0700
Received: from [192.0.2.1] by netcom13.netcom.com (8.6.12/Netcom)
	id RAA18684; Sat, 17 Jun 1995 17:15:28 -0700
X-Sender: grantbow@netcom13.netcom.com
Message-Id: <v02120d02ac091e84acc5@[192.0.2.1]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sat, 17 Jun 1995 17:14:44 -0700
To: debian-bugs@pixar.com
From: grantbow@netcom.com (Grant R. Bowman)
Subject: Re: Bug#1017: Kernel Module Errors on Upgrade

At 1:39 PM 6/17/95, Grant R. Bowman wrote:
>Package: base
>Version: 93R5
>
>Can't open dependancies file /lib/modules/1.2.10/modules.dep: (No such
>file or directory)
>
>This is the bug part
>--------------------
>This error appeared when I upgraded by kernel.  I suggest that the file
>'/etc/init.d/modules' have an if statement added to skip over the error
>message if no modules are detected instead of giving the error that it
>does.  Actually, the only error is the 'depmod -a' line I think, so I
>changed it to
>
>16      If [ $modules ]; then
>17        depmod -a
>18      fi
>
>instead of just:
>
>16      depmod -a

Well, this isn't a complete fix.  I didn't test with modues using the 1.2.1
kernel after my change.  I just ran that test, and despite (I think) it
works, it outputs this now:

Calculating dependencies... /etc/init.d/modules: [: too many arguments
done.

And then loads the individual modules with /sbin/insmod lines.

So this modification would work if [$modules] would work, but modules is a
list, not a text string, so it complains.  So how can I evaluate to 0 if
there are 0 elements, but one otherwise?

Almost had it...

Cheers,

--
-- Grant R. Bowman                                AdvoTech
-- <grantbow@netcom.com>         Computer and Software Asset Manaagement



Acknowledgement sent to grantbow@netcom.com (Grant R. Bowman):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#1017; Package base. Full text available.

Message received at debian-bugs:


From netcom.com!grantbow Sat Jun 17 13:40:38 1995
Return-Path: <grantbow@netcom.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sN4fW-0007mqC; Sat, 17 Jun 95 13:40 PDT
Received: from netcom13.netcom.com by pixar.com with SMTP id AA11585
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 17 Jun 1995 13:39:10 -0700
Received: from DialupEudora by netcom13.netcom.com (8.6.12/Netcom)
	id NAA28134; Sat, 17 Jun 1995 13:39:52 -0700
X-Sender: grantbow@netcom13.netcom.com
Message-Id: <v02120d01ac08dc8ddf87@[192.0.2.1]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sat, 17 Jun 1995 13:39:06 -0700
To: debian-bugs@pixar.com
From: grantbow@netcom.com (Grant R. Bowman)
Subject: Kernel Module Errors on Upgrade

Package: base
Version: 93R5

Can't open dependancies file /lib/modules/1.2.10/modules.dep: (No such file
or directory)

This is the bug part
--------------------
This error appeared when I upgraded by kernel.  I suggest that the file
'/etc/init.d/modules' have an if statement added to skip over the error
message if no modules are detected instead of giving the error that it
does.  Actually, the only error is the 'depmod -a' line I think, so I
changed it to

16      If [ $modules ]; then
17        depmod -a
18      fi

instead of just:

16      depmod -a

The rest is echo stuff, so I think this fixes the error completely under
all circumstances.

This is the suggestion part
---------------------------
As I do not have the modules package (which I think I need to make the
modules, don't I?) I am not able to install a modulized kernel.  It again
depends on who your intended audience is whether the default installed
kernel has everything compiled in or whether it uses modules.

I would submit that Linux distributions these days are going to get into
the hands of people which have no clue (even less of a clue than I do) how
to compile a kernel.  These added messages might likely cause a greater
volume of bugs to be reported.  And because I only have the base disks
installed, it took me awhile to use 'ed' to commented out lines in
/etc/modules and /etc/init!  My O'Reilly Nutshell lists ex, it doesn't even
cover ed directly.  I haven't figured out what the difference is actually
(aside from no prompt in ed), but it's an indicator of a possible future
bug for me.  I haven't reported that one, yet...

 Q Q
  L
   J


I am using Debian 0.93R5 alpha, (newly installed) kernel version 1.2.10 and
libc 4.6.27.  I have installed ONLY the base system (and now the new
kernel) for testing purposes.

Cheers,

--
-- Grant R. Bowman                                AdvoTech
-- <grantbow@netcom.com>         Computer and Software Asset Manaagement



Acknowledgement sent to grantbow@netcom.com (Grant R. Bowman):
New bug report received and forwarded. Full text available.
Report forwarded to debian-devel@pixar.com:
Bug#1017; Package base. Full text available.
Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov