fix block-extroot on brcm-2.4 (#9454)
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 12 Aug 2011 03:35:56 +0000 (03:35 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 12 Aug 2011 03:35:56 +0000 (03:35 +0000)
SVN-Revision: 27964

package/block-extroot/Makefile
package/block-extroot/files/extmount.sh

index 05d5e18a1ab51ffd45abb769dff17abe1ccf1242..69a070ecd459132d0c9c7466c903577b3f432330 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=block-extroot
 PKG_VERSION:=0.0.1
-PKG_RELEASE:=2
+PKG_RELEASE:=2.1
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
 
index f696324f71dc3011f54664df7aa31cf4d1e83457..337951ca0cdc79eb253e0eef2588ec66ed2d8d0a 100644 (file)
@@ -19,7 +19,11 @@ er_load_modules() {
        ln -sf /lib/modules/*/* /tmp/overlay/lib/modules/*/* /tmp/extroot_modules/modules
        local modules="$(grep -l '# May be required for rootfs' /tmp/extroot_modules/modules.d/*)"
        cd /tmp/extroot_modules/modules && {
-               cat $modules | sed -e 's/^\([^#].*\)/insmod \.\/\1.ko/'| sh 2>&- || :
+               module_suffix=ko
+               case "$(uname -r)" in
+                       2.4.*) module_suffix=o ;;
+               esac
+               cat $modules | sed -e 's/^\([^#].*\)/insmod \.\/\1.'$module_suffix'/'| sh 2>&- || :
        }
        rm -rf /tmp/extroot_modules
 }