Changeset 2715 in MondoRescue for branches/2.2.10/mindi/mindi


Ignore:
Timestamp:
Feb 2, 2011, 1:18:23 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Document in man page and HOWTO the previous syntax modifications for -E/-I options and '|' separator
  • Fix #444. mondoarchive now supports inclusion/exclusion of dirs with spaces in their name. this required a syntax change for the -E/-I options where the list of dirs needs to be separated by '|' now instead of ' '.
  • Fix issus with mindi when launched from a dir containing spaces
  • Fix a but when no -E option is give on CLI (null) string generated
  • Fix #459 by correcting an old README containing info on the edit-mountlist binary which doesn't exist.

svn merge -r 2709:2714 svn+ssh://bruno@svn.mondorescue.org/mondo/svn/mondorescue/branches/2.2.9 .

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/mindi

    r2708 r2715  
    222222
    223223    mkdir -p $bigdir/etc
    224     tar cf - -C / $mappath 2>> $MINDI_TMP/$$.log | (cd $bigdir ; tar xf -) || LogAll "AKMF -- Could not copy $mappath to $bigdir" $MINDI_TMP/$$.log
     224    tar cf - -C / $mappath 2>> $MINDI_TMP/$$.log | (cd "$bigdir" ; tar xf -) || LogAll "AKMF -- Could not copy $mappath to $bigdir" $MINDI_TMP/$$.log
    225225    if [ "`echo $mappath | grep -F ".gz"`" ] ; then
    226226        included_list=`gzip -dc $mappath | grep -Fi include | sed s/'"'// | sed s/'"'// | cut -d' ' -f2`
     
    266266            find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 0
    267267        elif [ -e "$incoming" ] && [ $found = "false" ]; then
    268             tar cf - -C / $incoming 2>> $MINDI_TMP/$$.log | (cd $outdir ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" $MINDI_TMP/$$.log
     268            tar cf - -C / $incoming 2>> $MINDI_TMP/$$.log | (cd "$outdir" ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" $MINDI_TMP/$$.log
    269269
    270270            # Only uncompress modules if not using udevd
     
    468468    fi
    469469    # Find all files and links (required for some VMWare VMs)
    470     modpaths=`find $1 -name $2.*o -o -name $2.o.gz -o -name $2.ko.gz -o -name $2 -type f -o -type l`
     470    modpaths=`find "$1" -name $2.*o -o -name $2.o.gz -o -name $2.ko.gz -o -name $2 -type f -o -type l`
    471471    echo "$modpaths"
    472472}
     
    580580            LogAll "\nIncorporating post-nuke tarball"
    581581            old_pwd=`pwd`
    582             cd $bigdir
     582            cd "$bigdir"
    583583            tar -zxf $MINDI_TMP/post-nuke.tgz 2>> $MINDI_TMP/$$.log || LogAll "Error occurred when untarring post-nuke tarball" $MINDI_TMP/$$.log
    584             cd $old_pwd
     584            cd "$old_pwd"
    585585        fi
    586586        cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2>> $LOGFILE || LogAll "\nMondo v1.2x defaults to LILO as the bootloader, BTW."
     
    14081408    fi
    14091409    old_pwd=`pwd`
    1410     cd $MINDI_TMP/iso
     1410    cd "$MINDI_TMP/iso"
    14111411    LogFile "-------------------"
    14121412    LogFile "Content of the ISO:"
     
    14371437    fi
    14381438    rm -f $MINDI_TMP/mkisofs.log
    1439     cd $old_pwd
     1439    cd "$old_pwd"
    14401440}
    14411441
     
    17831783        echo -en "Kernel size = `du -sk $kernelpath | cut -f1` K\nRamdisk free = $free_space K\n" >> $LOGFILE
    17841784        [ "$mountpoint" != "" ] && rm -f $mountpoint/vmlinuz
    1785         cd $old_pwd
     1785        cd "$old_pwd"
    17861786        umount $mountpoint || Die "Cannot unmount mountpoint ($mountpoint)"
    17871787        rmdir $mountpoint || LogAll "Cannot rmdir (PBDI)"
     
    18941894
    18951895    old_pwd=`pwd`
    1896     cd $bigdir
     1896    cd "$bigdir"
    18971897
    18981898    # Get terminfo content
     
    19091909        tar cf - -C / ./lib/dev-state 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Unable to handle /lib/dev-state" $MINDI_TMP/$$.log
    19101910    fi
    1911     cd $old_pwd
     1911    cd "$old_pwd"
    19121912    echo -e "$DONE"
    19131913    TOTAL_BIGDIR_SIZE=`du -sk $bigdir | cut -f1`
     
    19291929    echo -en "Tarring and zipping the data content..."
    19301930    size_of_all_tools=`du -sk $bigdir | cut -f1`
    1931     (cd $bigdir ; tar -b 4096 -cf - . 2>> $MINDI_TMP/$$.log | gzip -9 > $imagesdir/all.tar.gz || LogAll "Problem creating all.tar.gz" $MINDI_TMP/$$.log)
     1931    (cd "$bigdir" ; tar -b 4096 -cf - . 2>> $MINDI_TMP/$$.log | gzip -9 > $imagesdir/all.tar.gz || LogAll "Problem creating all.tar.gz" $MINDI_TMP/$$.log)
    19321932    LogFile "Size of the data content"
    19331933    LogFile "------------------------"
     
    23402340    fi
    23412341
    2342     cd $old_pwd
     2342    cd "$old_pwd"
    23432343    if [ _"$MONDO_SHARE" != _"" ]; then
    23442344        MakeMondoConfigFile $MINDI_CACHE/mondorestore.cfg
     
    24032403    LogFile "Content of initial ramdisk:"
    24042404    LogFile "---------------------------"
    2405     (cd $mountpoint ; ls -Rla ) >> $LOGFILE
     2405    (cd "$mountpoint" ; ls -Rla ) >> $LOGFILE
    24062406    LogFile "---------------------------"
    24072407
     
    24142414        LogFile "Creating an $gvFileSystem initrd image..."
    24152415        # kernel expects linuxrc in ext2 filesystem
    2416         ( cd $mountpoint && ln -sf sbin/init linuxrc )
     2416        ( cd "$mountpoint" && ln -sf sbin/init linuxrc )
    24172417        # unmount loop filesystem and create image file using the standard approach
    24182418        umount $mountpoint || Die "Cannot unmount $tempfile"
     
    24302430        which cpio &> /dev/null; [ $? -eq 0 ] || Die "cpio not found. Please install package cpio and try again."
    24312431        # go into filesystem
    2432         cd $mountpoint
     2432        cd "$mountpoint"
    24332433        # kernel expects init in cpio filesystem
    24342434        ln -sf sbin/init init
    24352435        # create cpio image file and unmount loop filesystem
    24362436        find . -print | cpio -o -H newc | gzip -9 > $rdz_fname 2> /dev/null
    2437         cd $old_pwd
     2437        cd "$old_pwd"
    24382438        umount $mountpoint || Die "Cannot unmount $tempfile"
    24392439        # log that we are done
Note: See TracChangeset for help on using the changeset viewer.