Changeset 1908


Ignore:
Timestamp:
Apr 14, 2008, 12:10:45 PM (11 years ago)
Author:
bruno
Message:

Replacement of cp --parents which may not work correctly with symlinks with tar c | tar x which is always working correctly for that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.6/mindi/mindi

    r1902 r1908  
    24452445        s=`which $w 2> /dev/null`
    24462446        if [ -e "$s" ] ; then
    2447             cp --parents -af $s . 2>> $LOGFILE
     2447            #cp --parents -af $s . 2>> $LOGFILE
     2448            tar cf - $s | tar xf - 2> /dev/null
    24482449        fi
    24492450    done
     
    24582459    if [ $? -eq 0 ]; then
    24592460        LocateDeps $MINDI_LIB/rootfs/bin/busybox /bin/mount > $MINDI_TMP/busy.lis
    2460         cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .
     2461        #cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .
     2462        tar cf - `sort -u $MINDI_TMP/busy.lis` | tar xf - 2> /dev/null
    24612463        rm -f $MINDI_TMP/busy.lis
    24622464    fi
     
    24672469        echo "udev device manager found" > tmp/USE-UDEV
    24682470        LogIt "udev device manager found"
    2469         cp --parents -Rdf /etc/udev . 2> /dev/null
     2471        #cp --parents -Rdf /etc/udev . 2> /dev/null
     2472        tar cf - /etc/udev | tar xf - 2> /dev/null
    24702473        # This avoids NIC remapping if on another machine at restore time on Debian at least
    24712474        rm -f ./etc/udev/rules.d/z25_persistent-net.rules
    2472         cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null
     2475        #cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null
     2476        tar cf - /lib*/udev | tar xf - 2> /dev/null
    24732477        if [ -x /sbin/udevd ]; then
    24742478            lis2=`grep -Ev '^#' $MINDI_CONF/udev.files`
     
    24962500                fi
    24972501            done
    2498             cp --parents -Rdf $lis `sort -u $MINDI_TMP/udev.lis` .
     2502            #cp --parents -Rdf $lis `sort -u $MINDI_TMP/udev.lis` .
     2503            tar cf - $lis `sort -u $MINDI_TMP/udev.lis` | tar xf - 2> /dev/null
    24992504            rm -f $MINDI_TMP/udev.lis
    25002505        else
     
    25142519            lis=`grep -Ev '^#' $MINDI_CACHE/tools.files`
    25152520            LocateDeps $lis > $MINDI_TMP/tools.lis
    2516             cp --parents -Rdf $lis `sort -u $MINDI_TMP/tools.lis` .
     2521            #cp --parents -Rdf $lis `sort -u $MINDI_TMP/tools.lis` .
     2522            tar cf - $lis `sort -u $MINDI_TMP/tools.lis` | tar xf - 2> /dev/null
    25172523        fi
    25182524        if [ -f $MINDI_CACHE/mindi-rsthw ]; then
     
    25332539    fi
    25342540
    2535     cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
     2541    #cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
     2542    tar cf - /dev/fd0*[1,2][4,7,8]* | tar xf - 2> /dev/null
    25362543
    25372544    cd $old_pwd
     
    25762583        [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i
    25772584        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    2578         cp --parents -pdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
     2585        #cp --parents -Rpdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
     2586        tar cf - $i | (cd $mountpoint ; tar xf -) 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
    25792587        # Uncompress modules if not useing udev and native modprobe
    25802588        if [ ! -f $mountpoint/tmp/USE-UDEV ]; then
     
    25872595
    25882596    # Also copy modules.dep in case of udev so that normal modprobe works
    2589     cp --parents -pdf /$needed_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2597    #cp --parents -Rpdf /$needed_modules_path/modules.dep $mountpoint 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
     2598    tar cf - /$needed_modules_path/modules.dep | (cd $mountpoint ; tar xf -) 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
    25902599
    25912600    # For all modules supported, create symlinks under the mountpoint
Note: See TracChangeset for help on using the changeset viewer.