source: branches/backfire/package/block-extroot/files/extmount.sh @ 27964

Last change on this file since 27964 was 27964, checked in by jow, 5 years ago

[backfire] fix block-extroot on brcm-2.4 (#9454)

File size: 934 bytes
Line 
1#!/bin/sh
2# Copyright 2010 Vertical Communications
3
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6
7determine_root_device() {
8        root_device="$(mount | grep ' / ' | cut -f1 -d\  | grep -v rootfs )"
9}
10
11set_jffs_mp() {
12        jffs="$(awk '/jffs2/ {print $2}' /proc/mounts)"
13}
14
15er_load_modules() {
16        mkdir -p /tmp/extroot_modules/modules.d
17        mkdir -p /tmp/extroot_modules/modules
18        ln -sf /etc/modules.d/* /tmp/overlay/etc/modules.d/* /tmp/extroot_modules/modules.d
19        ln -sf /lib/modules/*/* /tmp/overlay/lib/modules/*/* /tmp/extroot_modules/modules
20        local modules="$(grep -l '# May be required for rootfs' /tmp/extroot_modules/modules.d/*)"
21        cd /tmp/extroot_modules/modules && {
22                module_suffix=ko
23                case "$(uname -r)" in
24                        2.4.*) module_suffix=o ;;
25                esac
26                cat $modules | sed -e 's/^\([^#].*\)/insmod \.\/\1.'$module_suffix'/'| sh 2>&- || :
27        }
28        rm -rf /tmp/extroot_modules
29}
30
Note: See TracBrowser for help on using the repository browser.