Changeset 3075 in MondoRescue for branches/3.0/mindi/mindi


Ignore:
Timestamp:
Nov 23, 2012, 11:50:01 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Handle better the symlinks during the copy of content in order to support the /lib issue for F17. To be tested. Works natively on Mandriva 2010.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/mindi

    r3073 r3075  
    277277
    278278CopyDependenciesToDirectory() {
    279     local outdir incoming fname counter d found
     279    local outdir incoming counter d found tdir
    280280    outdir=$1
    281281    mkdir -p $outdir
     
    296296            d=`dirname "$d"`
    297297        done
    298         if [ -d "$incoming" ] && [ ! -h "$incoming" ]; then
     298        if [ -d "$incoming" ]; then
    299299            find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir
    300300        elif [ -e "$incoming" ] && [ $found = "false" ]; then
    301             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
    302 
     301            if [ ! -h "$incoming" ]; then
     302                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
     303            else
     304                tdir=`dirname "$incoming"`
     305                if [ ! -e "$outdir/$tdir" ]; then
     306                    mkdir -p "$outdir/$tdir"
     307                fi
     308                cp --no-dereference --preserve=all $incoming "$outdir/$tdir"
     309            fi
    303310            # Only uncompress modules if not using udevd
    304311            if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then
    305312                gunzip -f $outdir/$incoming || LogIt "WARNING: Cannot gunzip $outdir/$incoming"
    306313            fi
    307             [ -x "$outdir" ] && StripExecutable $outdir "-$filename-"
     314            [ -x "$outdir" ] && StripExecutable $outdir
    308315            counter=$(($counter+1))
    309316            if [ "$counter" -ge "5" ] ; then
Note: See TracChangeset for help on using the changeset viewer.