Ignore:
Timestamp:
2011-10-28T15:10:50+02:00 (5 years ago)
Author:
nico
Message:

package/blockmount: simplify extroot module loading logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/block-mount/files/extmount.sh

    r26314 r28650  
    11#!/bin/sh 
    2 # Copyright 2010 Vertical Communications 
     2# Copyright (C) 2006-2011 OpenWrt.org 
     3# Copyright (C) 2010 Vertical Communications 
    34 
    45# This is free software, licensed under the GNU General Public License v2. 
     
    1617        mkdir -p /tmp/extroot_modules/modules.d 
    1718        mkdir -p /tmp/extroot_modules/modules 
    18         ln -sf /etc/modules.d/* /tmp/overlay/etc/modules.d/* /tmp/extroot_modules/modules.d 
     19        cp -L /etc/modules-boot.d/* /tmp/overlay/etc/modules-boot.d/* /tmp/extroot_modules/modules.d 
    1920        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/* 2>/dev/null)" 
     21        local modules="$(cat /tmp/extroot_modules/modules.d/* 2>/dev/null)" 
    2122        cd /tmp/extroot_modules/modules && [ -n "$modules" ] && { 
    2223                cat $modules | sed -e 's/^\([^#].*\)/insmod \.\/\1.ko/'| sh 2>&- || : 
Note: See TracChangeset for help on using the changeset viewer.