Comment 15 for bug 8832

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sun, 12 Sep 2004 12:25:01 +0200
From: Eduard Bloch <email address hidden>
To: "Marco d'Itri" <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#269305: no warning in the manpage

--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

#include <hallo.h>
* Marco d'Itri [Sun, Sep 12 2004, 11:26:17AM]:
> On Sep 12, Eduard Bloch <email address hidden> wrote:
>
> > Really, I expected that a tool like update-modules
> > still reads /etc/modprobe.d and created /etc/modprobe.conf, and I spent
> root@wonderland:~#cat /sbin/update-modules
> #!/bin/sh -e
> if [ -x /sbin/update-modules.modutils ]; then
> exec /sbin/update-modules.modutils "$*"
> fi
> exit 0
> root@wonderland:~#

That is no the point. I expected the update-modules from
module-init-tools to create /etc/modprobe.conf (because of the apparent
"modules*" -> "modprobe*" name transition). Believe it or not,
upstream thinking != user thinking.

> update-modules has never created /etc/modprobe.conf, BTW.

I see, but something has created it. And messed up few things here.

> > - separate paragraph in the modprobe and modprobe.conf manpages!
> Please send a patch.

Attached.

> > - a warning appearing when the init script starts and modprobe.conf
> > exist and something in modprobe.d/ exists as well. Eg.
> This would be bogus, modprobe.conf may include modprobe.d/.

Possible, but also dealt with by the patch below.

Regards,
Eduard.
--
"The quiet ones are the ones who change the universe.
 The loud ones only take the credit."
                                                               L.M. ItB

--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="proper_warnings.diff"

diff -u module-init-tools-3.1-pre5/debian/changelog module-init-tools-3.1-pre5/debian/changelog
--- module-init-tools-3.1-pre5/debian/changelog
+++ module-init-tools-3.1-pre5/debian/changelog
@@ -1,3 +1,11 @@
+module-init-tools (3.1-pre5-7) unstable; urgency=low
+
+ * Eduard Bloch: Added warnings about modprobe.conf vs. modprobe.d usage in
+ the init script, update-modprobe, modprobe, modprobe.conf manpages
+ (patch: manpage_warnings, closes: Bug#269305)
+
+ -- Eduard Bloch <email address hidden> Sun, 12 Sep 2004 12:13:32 +0200
+
 module-init-tools (3.1-pre5-6) unstable; urgency=high

   * Removed the autofs4 alias. (Closes: #267065, #261026)
diff -u module-init-tools-3.1-pre5/debian/module-init-tools.init module-init-tools-3.1-pre5/debian/module-init-tools.init
--- module-init-tools-3.1-pre5/debian/module-init-tools.init
+++ module-init-tools-3.1-pre5/debian/module-init-tools.init
@@ -43,4 +43,12 @@
     modprobe "$mod"
 done
+
+# catch the corner case where modprobe.conf exists (bad) but is not configured
+# to include additional files (eg. not including modprobe.d), so may be created
+# by stupid tools and is a problem unknown for the system administrator
+if test -r /etc/modprobe.conf && ! grep -q 'include.*modprobe.d' /etc/modprobe.conf ; then
+ echo 'WARNING: /etc/modprobe.conf exists but does not include /etc/modprobe.d!'
+fi
+
 exit 0

diff -u module-init-tools-3.1-pre5/extra/update-modules.8 module-init-tools-3.1-pre5/extra/update-modules.8
--- module-init-tools-3.1-pre5/extra/update-modules.8
+++ module-init-tools-3.1-pre5/extra/update-modules.8
@@ -11,6 +11,15 @@
 .B update\-modules
 program provided by the modutils package)
 if it exists and do nothing else.
+.PP
+Note that the file
+.I /etc/modprobe.conf
+is not the exact equivalent of
+\fI/etc/modules.conf\fR.
+It is not required for module-init-tools and is not generated any more. In fact,
+most people should not create that file since \fI/etc/modprobe.d/*\fR would be
+ignored in this case but Debian packages store their additional configuration
+files in \fI/etc/modprobe.d/\fR.
 .SH "SEE ALSO"
 .BR depmod (1)
 .BR modprobe (8)
only in patch2:
unchanged:
--- module-init-tools-3.1-pre5.orig/debian/patches/manpage_warnings
+++ module-init-tools-3.1-pre5/debian/patches/manpage_warnings
@@ -0,0 +1,44 @@
+diff -urd module-init-tools-3.1-pre5.orig/modprobe.8 module-init-tools-3.1-pre5/modprobe.8
+--- module-init-tools-3.1-pre5.orig/modprobe.8 2004-09-12 11:34:15.000000000 +0200
++++ module-init-tools-3.1-pre5/modprobe.8 2004-09-12 11:51:07.000000000 +0200
+@@ -30,7 +30,11 @@
+ the modules and other files, except for the optional
+ \fI/etc/modprobe.conf\fR or \fI/etc/modprobe.d\fR
+ (see \fBmodprobe.conf\fR(5)).
+-Every file in the \fI/etc/modprobe.d/arch/\fR directory is ignored.
++.PP
++By default, \fBmodprobe\fR tries to find additional configuration data either
++in \fI/etc/modprobe.conf\fR or \fI/etc/modprobe.d/*\fR (but not both, see
++\fBmodprobe.d\fR(5) for details).
++Every file in the \fI/etc/modprobe.d/arch/\fR directory is ignored.
+ .PP
+ Note that this version of \fBmodprobe\fR does not
+ do anything to the module itself: the work of resolving symbols
+Nur in module-init-tools-3.1-pre5: modprobe.8~.
+diff -urd module-init-tools-3.1-pre5.orig/modprobe.conf.5 module-init-tools-3.1-pre5/modprobe.conf.5
+--- module-init-tools-3.1-pre5.orig/modprobe.conf.5 2004-09-12 11:34:15.000000000 +0200
++++ module-init-tools-3.1-pre5/modprobe.conf.5 2004-09-12 11:45:33.000000000 +0200
+@@ -17,10 +17,17 @@
+ containing other directories and files, which are all read together.
+ Every file in the \fI/etc/modprobe.d/arch/\fR directory is ignored.
+ \fImodprobe.conf\fR is usually a single file, but the syntax is the same.
+-They can also be used to create convenient aliases: alternate names
+-for a module. Finally, they can override the normal \fBmodprobe\fR
+-behavior altogether, for those with very special requirements (such as
+-inserting more than one module).
++.PP
++\fBNOTE:\fR If the file \fI/etc/modprobe.conf\fR exists, all contents of
++\fI/etc/modprobe.d/\fR are ignored by default. It is up to the system
++administrator to keep them in sync, either using a tool to concenate files
++\fI/etc/modprobe.d/\fR and write \fI/etc/modprobe.conf\fR or using
++\fBinclude\fR statements to share the configuration data (see below).
++.PP
++They config directives can also be used to create convenient aliases:
++alternate names for a module. Finally, they can override the normal
++\fBmodprobe\fR behavior altogether, for those with very special requirements
++(such as inserting more than one module).
+ .PP
+ Note that module and alias names (like other module names) can
+ have - or _ in them: both are interchangable throughout all the
+Nur in module-init-tools-3.1-pre5: modprobe.conf.5~.
+Nur in module-init-tools-3.1-pre5: .modprobe.conf.5.swp.

--MGYHOYXEY6WxJCY8--