Skip to contentSkip to conversation

Problem with init script and monolithic kernels

DISCUSSION Steinar H. Gunderson 2 participants 3 messages Jan 29, 2005 – Jan 31, 2005 Kernel automounter

lore
Share & tools
lore
#0 lore raw

Hi,

A Debian user complained about the line

if lsmod | grep -q autofs[^4]

in the init.d script failing on monolithic kernels (lsmod outputs "lsmod:
QM_MODULES: Function not implemented" and fails with exit code 1, which makes the entire init.d script stop due to set -e). Ian, could you change this to something like this in time for 4.1.4?

  if ( [ -f /proc/modules ] && lsmod ) | grep -q autofs[^4]

I haven't been able to test it myself except on a module-enabled machine (I have no machines without module support readily available), but it looks quite straightforward to me and should fix the problem.

(Actually, the line reads elsif in our version, but that's a different story, which we've discussed here briefly earlier :-) )

/* Steinar */

Signature · 1 line
Homepage: http://www.sesse.net/
#1 lore raw
Quoted 3 lines · Steinar H. Gunderson

I haven't been able to test it myself except on a module-enabled machine (I have no machines without module support readily available), but it looks quite straightforward to me and should fix the problem.

The user responded, and saying the patch fixed his problem, so it should be quite safe for 4.1.4.

/* Steinar */

Signature · 1 line
Homepage: http://www.sesse.net/
maintainer
#2 lore raw
Quoted 7 lines · Steinar H. Gunderson
Quoted 3 lines · Steinar H. Gunderson

I haven't been able to test it myself except on a module-enabled machine (I have no machines without module support readily available), but it looks quite straightforward to me and should fix the problem.

The user responded, and saying the patch fixed his problem, so it should be quite safe for 4.1.4.

OK. I'll make the change.

Ian