Changeset 2603 in MondoRescue for branches/2.2.10/mindi/rootfs/sbin/init


Ignore:
Timestamp:
Mar 22, 2010, 1:56:30 PM (14 years ago)
Author:
Bruno Cornec
Message:

r3757@localhost: bruno | 2010-03-17 15:05:13 +0100

  • Adds a new interface param between mondoarchive and mindi for backup-media-type which was missing
  • Improve again logging
  • Try to improve keymap support
  • Remove some remaining hard coded /proc/cmdline
  • Adds a cache for the find command for modules launched twice to make it quicker on my Atom netboot in a QEMU VM
  • Remove dependency at build time on mindi to only use MINDI_CONF env var
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/rootfs/sbin/init

    r2597 r2603  
    9191    openvt -l /bin/sh /sbin/wait-for-petris
    9292    openvt -l /usr/bin/tail -f $LOGFILE
     93    serial="/foo"
    9394    # By default first serial line is configured as tty
    9495    # Required to have a correct serial console support (MP on ia64 or VSP with iLO2 e.g.)
    95     for i in `cat /proc/cmdline` ; do
     96    for i in `cat $CMDLINE` ; do
    9697        echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2`
    9798    done
     
    376377
    377378StartLvms() {
    378     if [ "`grep -i nolvm /proc/cmdline`" ]; then
     379    if [ "`grep -i nolvm $CMDLINE`" ]; then
    379380        return;
    380381    fi
     
    497498    local raid_devices i
    498499
    499     if [ "`grep -i noraid /proc/cmdline`" ]; then
     500    if [ "`grep -i noraid $CMDLINE`" ]; then
    500501        return;
    501502    fi
     
    512513        done
    513514    elif which mdrun > /dev/null 2> /dev/null ; then
    514         if [ "`grep -i nomd /proc/cmdline`" ]; then
     515        if [ "`grep -i nomd $CMDLINE`" ]; then
    515516            return;
    516517        fi
     
    518519        mdrun
    519520    elif which mdadm > /dev/null 2> /dev/null ; then
    520         if [ "`grep -i nomd /proc/cmdline`" ]; then
     521        if [ "`grep -i nomd $CMDLINE`" ]; then
    521522            return;
    522523        fi
     
    636637ModprobeAllModules() {
    637638
    638     lismod=`find /lib/modules -name '*\.ko*' -o -name '*\.o*'`
     639    echo "Preparing to install modules..."
     640    # Create a cache first time
     641    if [ ! -f /tmp/lismod.txt ]; then
     642        find /lib/modules -name '*\.ko*' -o -name '*\.o*' > /tmp/lismod.txt
     643    fi
     644    lismod=`cat /tmp/lismod.txt`
    639645    # loading forced modules first
    640646    for m in $lismod; do
     
    650656        k=`basename $m | sed 's/\.ko.*$//'`
    651657        j=`basename $k | sed 's/\.o.*$//'`
     658        lsmod | grep -qE '^$j$'
     659        if [ $? -eq 0 ];then
     660            # Already loaded
     661            continue
     662        fi
    652663        echo "$DENY_MODS" | grep -q "$j "
    653664        if [ $? -eq 0 ]; then
     
    730741    export FORCE_MODS=" "
    731742fi
    732 if [ "`grep -i excludedevs /proc/cmdline`" ]; then
    733     export MINDI_EXCLUDE_DEVS="`cat /proc/cmdline | sed 's~.*excludedevs=\"\(.*\)\".*~\1~'` mondonone"
     743if [ "`grep -i excludedevs $CMDLINE`" ]; then
     744    export MINDI_EXCLUDE_DEVS="`cat $CMDLINE | sed 's~.*excludedevs=\"\(.*\)\".*~\1~'` mondonone"
    734745    for d in $MINDI_EXCLUDE_DEVS ; do
    735746        echo "Mountlist exclusion == $d"
Note: See TracChangeset for help on using the changeset viewer.