All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCHv2 5/6] update-modules: update script to read /etc/modules-load.d/ directory
Date: Fri, 23 Mar 2012 15:37:23 +0100	[thread overview]
Message-ID: <1332513443-16002-1-git-send-email-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <30ff40b68ca1bf9b04f5750e3018e6e50dfbf100.1332507302.git.Martin.Jansa@gmail.com>

* show warning for old /etc/modutils/* files without .conf extension
* v2: keep adding modules also from old /etc/modutils/* after showing
  warning, this way update-modules will be backward compatible also on
  images without kernel upgrade

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 .../update-modules-1.0/update-modules              |   15 +++++++++++++--
 .../update-modules/update-modules_1.0.bb           |    2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
index 7ee7df8..99040a1 100755
--- a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
+++ b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules
@@ -103,8 +103,8 @@ createfile() {
 $HEADER"
 #
 # Please do not edit this file directly. If you want to change or add
-# anything please take a look at the files in /etc/modutils and read
-# the manpage for update-modules.
+# anything please take a look at the files in /etc/modutils, /etc/modules-load.d 
+# and read the manpage for update-modules.
 #
 EOF
 }
@@ -161,6 +161,7 @@ fi
 createfile "$MODCONFTMPFILE"
 createfile "$MODULESTMPFILE"
 
+# well we're using /etc/modprobe.d/*.conf instead of /etc/modutils/*.conf anyway..
 for cfg in /etc/modutils/* $CONF ; do
 	if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs
 		if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
@@ -168,6 +169,16 @@ for cfg in /etc/modutils/* $CONF ; do
 		elif echo $cfg | grep -q '\.conf$' ; then
 			addfile "$cfg" "$MODCONFTMPFILE"
 		else
+			echo "Please migrate your $cfg file to /etc/modules-load.d/*.conf"
+			addfile "$cfg" "$MODULESTMPFILE"
+		fi
+	fi
+done
+for cfg in /etc/modules-load.d/*.conf; do
+	if [ -f "$cfg" ]; then # this check is necesarry to skip weird entries
+		if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
+		        true
+		else
 			addfile "$cfg" "$MODULESTMPFILE"
 		fi
 	fi
diff --git a/meta/recipes-kernel/update-modules/update-modules_1.0.bb b/meta/recipes-kernel/update-modules/update-modules_1.0.bb
index d9697de..2af75e6 100644
--- a/meta/recipes-kernel/update-modules/update-modules_1.0.bb
+++ b/meta/recipes-kernel/update-modules/update-modules_1.0.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa
 
 RDEPENDS_${PN} = "module-init-tools-depmod"
 
-PR = "r12"
+PR = "r13"
 
 SRC_URI = "file://update-modules \
            file://COPYING.GPL"
-- 
1.7.8.5




  reply	other threads:[~2012-03-23 14:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 12:56 [PATCH 0/6] kernel.bbclass updates Martin Jansa
2012-03-23 12:56 ` [PATCH 1/6] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
2012-03-23 23:00   ` Andreas Oberritter
2012-03-23 23:11     ` Martin Jansa
2012-03-26 11:25       ` Richard Purdie
2012-03-26 18:44   ` Darren Hart
2012-03-23 12:56 ` [PATCH 2/6] kernel.bbclass: use symlinks for modutils files Martin Jansa
2012-03-26 18:46   ` Darren Hart
2012-03-26 18:58     ` Martin Jansa
2012-03-26 22:05     ` Richard Purdie
2012-03-23 12:56 ` [PATCH 3/6] kernel.bbclass: use better number for KERNEL_PRIORITY Martin Jansa
2012-03-23 12:56 ` [PATCH 4/6] kernel.bbclass: fix extra + in kernelrelease Martin Jansa
2012-03-23 13:24   ` Bruce Ashfield
2012-03-23 13:31     ` Martin Jansa
2012-03-26 16:02       ` Martin Jansa
2012-03-26 16:05         ` Martin Jansa
2012-03-26 16:25         ` Bruce Ashfield
2012-03-26 17:29           ` [PATCH] kernel.bbclass: touch .scmversion also in ${S} Martin Jansa
2012-03-26 18:32             ` Bruce Ashfield
2012-03-23 12:56 ` [PATCH 5/6] update-modules: update script to read /etc/modules-load.d/ directory Martin Jansa
2012-03-23 14:37   ` Martin Jansa [this message]
2012-03-23 12:56 ` [PATCH 6/6] kernel.bbclass: don't create /etc/modutils/* Martin Jansa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332513443-16002-1-git-send-email-Martin.Jansa@gmail.com \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.