Patchwork [meta-oe,4/5] kernel.bbclass: use symlinks for modutils files

login
register
mail settings
Submitter Martin Jansa
Date March 23, 2012, 1:04 p.m.
Message ID <f8b56e72e3f667ff1c56f048da8541b307ad82b3.1332507730.git.Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/24283/
State Accepted
Commit 7c6bca094b8b59a4890ad9e3cc3799c5b9d443a2
Headers show

Comments

Martin Jansa - March 23, 2012, 1:04 p.m.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-oe/classes/kernel.bbclass |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

Patch

diff --git a/meta-oe/classes/kernel.bbclass b/meta-oe/classes/kernel.bbclass
index d87b177..3636ff0 100644
--- a/meta-oe/classes/kernel.bbclass
+++ b/meta-oe/classes/kernel.bbclass
@@ -420,16 +420,14 @@  python populate_packages_prepend () {
 		# appropriate modprobe commands to the postinst
 		autoload = d.getVar('module_autoload_%s' % basename, True)
 		if autoload:
-			name = '%s/etc/modutils/%s' % (dvar, basename)
-			f = open(name, 'w')
-			for m in autoload.split():
-				f.write('%s\n' % m)
-			f.close()
 			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
 			f = open(name, 'w')
 			for m in autoload.split():
 				f.write('%s\n' % m)
 			f.close()
+			modutils_name = '%s/etc/modutils/%s' % (dvar, basename)
+			modutils_target = '../modules-load.d/%s.conf' % (basename)
+			os.symlink(modutils_target, modutils_name)
 			postinst = d.getVar('pkg_postinst_%s' % pkg, True)
 			if not postinst:
 				bb.fatal("pkg_postinst_%s not defined" % pkg)