[Lunar-commits] <moonbase-other> easy-slow-down-manager: fix build for X.Y.0 linux releases

v4hn me at v4hn.de
Mon Jul 30 23:46:19 CEST 2012


commit 1ac40d3e2c1c54c9c1a695a0ae505f9969660975
Author: v4hn <me at v4hn.de>
Date: Mon, 30 Jul 2012 14:46:19 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/1ac40d3e2c1c54c9c1a695a0ae505f9969660975

easy-slow-down-manager: fix build for X.Y.0 linux releases
---
  utils/easy-slow-down-manager/BUILD                           +5/-1     
  utils/easy-slow-down-manager/POST_INSTALL                    +4/-1     
  2 files changed, 9 insertions (+), 2 deletions (-)

--- a/utils/easy-slow-down-manager/BUILD
+++ b/utils/easy-slow-down-manager/BUILD
@@ -1,7 +1,11 @@
 (
 
   # we want to build the module for the latest kernel, not the one running
-  sedit "s:uname -r:readlink /usr/src/linux | cut -d'-' -f2:" Makefile &&
+  # this also handles X.Y.0 linux releases, where the linux version
+  # is X.Y, but modules are stored in /lib/modules/X.Y.0 grrrhh
+  KVERSION=$(readlink /usr/src/linux | cut -d'-' -f2 | sed -e '/^[0-9]*\.[0-9]*$/ s:^\(.*\)$:\1.0:')
+
+  sedit "s:^\(KVERSION =\).*$:\1 ${KVERSION}:" Makefile &&
 
   make all &&
   prepare_install &&
--- a/utils/easy-slow-down-manager/POST_INSTALL
+++ b/utils/easy-slow-down-manager/POST_INSTALL
@@ -1 +1,4 @@
-depmod -a $(readlink /usr/src/linux | cut -d'-' -f2)
+# see BUILD for explanation
+KVERSION=$(readlink /usr/src/linux | cut -d'-' -f2 | sed -e '/^[0-9]*\.[0-9]*$/ s:^\(.*\)$:\1.0:')
+
+depmod -a $KVERSION




More information about the Lunar-commits mailing list