Fix depmod intercept. Patch from Andreas Oberritter.
authorgraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Wed, 2 Feb 2011 00:53:46 +0000 (00:53 +0000)
committergraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Wed, 2 Feb 2011 00:53:46 +0000 (00:53 +0000)
* If depmod -a ${KERNEL_VERSION} is called, the version should be retained.
* The script calls depmod -A, which does nothing if the installed module's
  timestamp is older than modules.dep's timestamp. As modules generally
  inherit the timestamp of the build, this would result in depmod doing nothing.

git-svn-id: http://opkg.googlecode.com/svn/trunk@599 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

intercept/depmod

index a60768f4d9a6a415800c08a9ba1121f2086a38e8..f8a4f9a2e89270d5c1e81e49ff2212e657a5cadf 100644 (file)
@@ -1,10 +1,10 @@
 #!/bin/sh
 
 if [ "x$1" = "x-a" ] || [ "x$1" = "x-A" ]; then
 #!/bin/sh
 
 if [ "x$1" = "x-a" ] || [ "x$1" = "x-A" ]; then
-  if [ ! -f $OPKG_INTERCEPT_DIR/depmod ]; then
-    echo "depmod -A" > $OPKG_INTERCEPT_DIR/depmod
-    chmod +x $OPKG_INTERCEPT_DIR/depmod
-  fi
+  echo "depmod $@" >> $OPKG_INTERCEPT_DIR/depmod
+  sort -u $OPKG_INTERCEPT_DIR/depmod > $OPKG_INTERCEPT_DIR/depmod.tmp
+  mv $OPKG_INTERCEPT_DIR/depmod.tmp $OPKG_INTERCEPT_DIR/depmod
+  chmod +x $OPKG_INTERCEPT_DIR/depmod
   exit 0
 fi
 
   exit 0
 fi