summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2012-03-23 15:37:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-23 17:47:42 +0000
commitcaaa5709b47ac1ed618dcc77cea2b14317e02643 (patch)
treea5d3f30b1602c1c5cc2ed297543a5c992ff8cd02 /meta/recipes-kernel
parentc73e50a91e02fb2ef0ab962fd97a32b5668a389e (diff)
downloadpoky-caaa5709b47ac1ed618dcc77cea2b14317e02643.tar.gz
update-modules: update script to read /etc/modules-load.d/ directory
* 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 (From OE-Core rev: 38302a1353cf072b7c6c54f7f90936e4c2180102) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rwxr-xr-xmeta/recipes-kernel/update-modules/update-modules-1.0/update-modules15
-rw-r--r--meta/recipes-kernel/update-modules/update-modules_1.0.bb2
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 7ee7df8192..99040a1ab4 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() {
103$HEADER" 103$HEADER"
104# 104#
105# Please do not edit this file directly. If you want to change or add 105# Please do not edit this file directly. If you want to change or add
106# anything please take a look at the files in /etc/modutils and read 106# anything please take a look at the files in /etc/modutils, /etc/modules-load.d
107# the manpage for update-modules. 107# and read the manpage for update-modules.
108# 108#
109EOF 109EOF
110} 110}
@@ -161,6 +161,7 @@ fi
161createfile "$MODCONFTMPFILE" 161createfile "$MODCONFTMPFILE"
162createfile "$MODULESTMPFILE" 162createfile "$MODULESTMPFILE"
163 163
164# well we're using /etc/modprobe.d/*.conf instead of /etc/modutils/*.conf anyway..
164for cfg in /etc/modutils/* $CONF ; do 165for cfg in /etc/modutils/* $CONF ; do
165 if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs 166 if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs
166 if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then 167 if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
@@ -168,6 +169,16 @@ for cfg in /etc/modutils/* $CONF ; do
168 elif echo $cfg | grep -q '\.conf$' ; then 169 elif echo $cfg | grep -q '\.conf$' ; then
169 addfile "$cfg" "$MODCONFTMPFILE" 170 addfile "$cfg" "$MODCONFTMPFILE"
170 else 171 else
172 echo "Please migrate your $cfg file to /etc/modules-load.d/*.conf"
173 addfile "$cfg" "$MODULESTMPFILE"
174 fi
175 fi
176done
177for cfg in /etc/modules-load.d/*.conf; do
178 if [ -f "$cfg" ]; then # this check is necesarry to skip weird entries
179 if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then
180 true
181 else
171 addfile "$cfg" "$MODULESTMPFILE" 182 addfile "$cfg" "$MODULESTMPFILE"
172 fi 183 fi
173 fi 184 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 d9697de6c3..2af75e6a99 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
5 5
6RDEPENDS_${PN} = "module-init-tools-depmod" 6RDEPENDS_${PN} = "module-init-tools-depmod"
7 7
8PR = "r12" 8PR = "r13"
9 9
10SRC_URI = "file://update-modules \ 10SRC_URI = "file://update-modules \
11 file://COPYING.GPL" 11 file://COPYING.GPL"