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


Ignore:
Timestamp:
Jan 21, 2010, 8:50:00 PM (14 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 2523:2545 /mondorescue/branches/2.2.9

  • Adds the --rescue flag to ntfsclone (Andree Leidenfrost andree_at_debian.org)
  • Fix 2 typos in the HOWTO (reported by Bram Mertens bram-mertens_at_linux.be)
  • Patch from Rogério Brito rbrito_at_ime.usp.br which fixes errors in man pages format
  • Fix syntax issue in analyze-my-lvm
  • Better doc for pre and post
  • Finally the function ListLvmDrivesAndPartitions is used, as it creates info parsed by mindi !! So reverting back to filter excluded devices in it
  • Better exclusion of the LVs from the mountlist at restore time if excludedevs used
  • Exclude LVs whose VGs are excluded now in analyze-my-lvm
  • First attempt to support device exclusion at restore time through a new boot param excludedevs
  • Fix a bug preventing execution of the pre script in init
  • LVM exclusion based on devices was flawed as the function targeted was not really useful. That script shold be fully rewritten to have a data structure contaiing what is needed. Anyway the current patch should allow to have some improvements
  • Do not report Duplicate mount point when lvm is used
  • each device of the EXCLUDE_DEVS list is now used correctly and partitions found on this device are excluded
  • Fix the way the dsf is declared in the linked list to have it work
  • Fix #383 by using pvdisplay instead of relying on 8e as partition type
  • Try to fix #384 by always excluding the dfs per users wish
  • Also use the exclude dev feature in case of multipath and exclude resulting /dev/mapper/mpath type of files
  • Fix #381 by postfixing spaces at the end of the strings to be cheked in strstr
File:
1 edited

Legend:

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

    r2508 r2546  
    391391            vgscan
    392392        fi
     393
     394        # Exclude devices we may not want
     395        rm -f /tmp/restorevgs
     396        for d in $EXCLUDE_DEVS ; do
     397            echo " == $d"
     398            EXCLUDE_VGS=`grep " $d" /tmp/i-want-my-lvm | grep vgcreate | awk '{print $4}'`
     399            vg=`echo $EXCLUDE_VGS | sed "s/ /|/g"`
     400            if [ "$vg" != "" ]; then
     401                re=" $d|$vg"
     402            else
     403                re=" $d"
     404            fi
     405            # Remove VGs from i-want-my-lvm
     406            grep -Ev "$re" /tmp/i-want-my-lvm > /tmp/i-want-my-lvm.new
     407            mv /tmp/i-want-my-lvm.new /tmp/i-want-my-lvm
     408            # Prepare  script to restore the VG exluded here if needed
     409            for v in $EXCLUDE_VGS; do
     410                echo "vgcfgrestore $v" >> /tmp/restorevgs
     411                # Remove LVs from mountlist
     412                EXCLUDE_LVS=`grep " $v" /tmp/i-want-my-lvm | grep lvcreate | sed "s/^.*-n \([^ ][^ ]*\) .*$/$1/"`
     413                for l in $EXCLUDE_LVS; do
     414                    # FIXME: Should search for all possible device names here
     415                    grep -Ev "/dev/$v/$l" /tmp/mountlist.txt > /tmp/mountlist.txt.new
     416                    grep -Ev "/dev/mapper/${v}-v$l" /tmp/mountlist.txt.new > /tmp/mountlist.txt
     417                done
     418            done
     419        done
     420
    393421        grep -E "^#.*vgchange" /tmp/i-want-my-lvm | sed "s/^#[ ]*//" > /tmp/start-lvm
    394422        chmod +x /tmp/start-lvm
     
    685713    export FORCE_MODS=" "
    686714fi
     715if [ "`grep -i excludedevs /proc/cmdline`" ]; then
     716    export EXCLUDE_DEVS="`cat /proc/cmdline | sed 's~.*excludedevs=\"\(.*\)\".*~\1~'` mondonone"
     717else
     718    export EXCLUDE_DEVS=" "
     719fi
    687720
    688721echo "Activating a potential USB keyboard/mouse"
     
    831864    # start-netfs moved it under /tmp as the NFS share is already unmounted
    832865    if [ "`echo $pre | grep -E '^/tmp/isodir'`" ]; then
    833         post=`echo $pre | sed 's|^/tmp/isodir|/tmp|'`
     866        pre=`echo $pre | sed 's|^/tmp/isodir|/tmp|'`
    834867    fi
    835868    if [ -x $pre ]; then
Note: See TracChangeset for help on using the changeset viewer.