Otherwise the module may not be found if the module package is installed
on its own, i.e. without the kernel package performing the depmod run.
As we now install a postinst baseline with the right mode, the chmod on
AUTOLOAD becomes obsolete.
Changes in v3:
- remove now obsolete chmod on AUTOLOAD
meta/recipes-kernel/linux-module/files/debian/postinst | 4 ++++
meta/recipes-kernel/linux-module/module.inc | 1 -
2 files changed, 4 insertions(+), 1 deletion(-)
create mode 100755 meta/recipes-kernel/linux-module/files/debian/postinst
diff --git a/meta/recipes-kernel/linux-module/files/debian/postinst b/meta/recipes-kernel/linux-module/files/debian/postinst
new file mode 100755
index 0000000..baabf5d
--- /dev/null
+++ b/meta/recipes-kernel/linux-module/files/debian/postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+
+depmod -a
diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index 3075f44..76a49f3 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -26,6 +26,5 @@ dpkg_runbuild_prepend() {
if [ ${AUTOLOAD} = "1" ]; then
echo "echo ${PN} >> /etc/modules" >> ${S}/debian/postinst
- chmod +x ${S}/debian/postinst
fi
}
--
2.16.4