[Lunar-commits] <moonbase-core> Merge branch 'depmod-plugin'
v4hn
me at v4hn.de
Mon Sep 16 01:24:39 CEST 2013
commit f0ec4c8f6fb16832986a39d7f72330e766a1bb0a
Author: v4hn <me at v4hn.de>
Date: Sun, 15 Sep 2013 16:23:18 -0700
URL: https://github.com/lunar-linux/moonbase-core/commit/f0ec4c8f6fb16832986a39d7f72330e766a1bb0a
Merge branch 'depmod-plugin'
---
kernel/kmod/plugin.d/postbuild-depmod.plugin | +28/-0
1 file changed, 28 insertions(+)
--- /dev/null
+++ b/kernel/kmod/plugin.d/postbuild-depmod.plugin
@@ -0,0 +1,28 @@
+#!/bin/bash
+######################################################################
+# #
+# postbuild-depmod.plugin - postbuild update kernel module #
+# dependency files #
+# #
+######################################################################
+# #
+# Copyright 2013 by Stefan Wold <ratler at lunar-linux.org> under GPLv2 #
+# #
+######################################################################
+
+
+plugin_depmod_post_build()
+{
+ debug_msg "plugin_depmod_post_build ($@)"
+
+ # Find installed kernel modules and then run depmod
+ parse_iw | grep "^/lib/modules/.*/" | cut -d/ -f4 | sort | uniq | while read kversion; do
+ debug_msg "Running depmod for kernel $kversion"
+ depmod -a $kversion
+ done
+
+ # We always return 2, fail or success
+ return 2
+}
+
+plugin_register BUILD_POST_BUILD plugin_depmod_post_build
More information about the Lunar-commits
mailing list