Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'depmod-plugin'

  • Loading branch information...
commit f0ec4c8f6fb16832986a39d7f72330e766a1bb0a 2 parents 4323b83 + 73e6c35
@v4hn v4hn authored
Showing with 28 additions and 0 deletions.
  1. +28 −0 kernel/kmod/plugin.d/postbuild-depmod.plugin
View
28 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@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
Please sign in to comment.
Something went wrong with that request. Please try again.