Changeset 2438 in MondoRescue for branches/2.2.9/mindi/mindi


Ignore:
Timestamp:
Sep 29, 2009, 2:41:36 PM (15 years ago)
Author:
Bruno Cornec
Message:
  • Improvements on sshfs/ssh management in restore mode
  • Include now all minimal requirements for sshfs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/mindi

    r2436 r2438  
    22562256        # We want to use the real mount and all the supported variants (nfs, cifs, ...)
    22572257        rm -f bin/mount $MINDI_TMP/busy.lis
    2258         mountlis=`grep -E "mount|fuse|ssh|libnss" $DEPLIST_FILE $DEPLIST_DIR/* | cut -d: -f2`
    2259         for f in $MINDI_LIB/rootfs/bin/busybox $mountlis ; do
    2260             if [ -f $f ]; then
    2261                 LocateDeps $f >> $MINDI_TMP/busy.lis
    2262             fi
     2258        mountlis=`grep -E "mount|fuse|ssh" $DEPLIST_FILE $DEPLIST_DIR/* | cut -d: -f2 | sort -u`
     2259        LocateDeps $MINDI_LIB/rootfs/bin/busybox $mountlis >> $MINDI_TMP/busy.lis
     2260        # Special for libs
     2261        for f in `grep -E "libnss" $DEPLIST_FILE $DEPLIST_DIR/* | cut -d: -f2`; do
     2262            echo "`ReadAllLink $f`" >> $MINDI_TMP/busy.lis
    22632263        done
     2264        # Initial / are trucated by tar
    22642265        tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogIt "Problem in mount analysis" $MINDI_TMP/$$.log
    22652266        rm -f $MINDI_TMP/busy.lis
    22662267    fi
     2268
     2269    # Copy of files mandatory for ssh to automate mount if sshfs is used
     2270    mkdir $mountpoint/.ssh
     2271    cp -rp ~root/.ssh/*.pub ~root/.ssh/config ~root/.ssh/known* $mountpoint/.ssh
     2272    echo > $mountpoint/tmp/myssh << EOF
     2273ssh -o StrictHostKeyChecking=no $*
     2274EOF
     2275    chmod 755 $mountpoint/tmp/myssh
    22672276
    22682277    # Copy of files mandatory for ld.so
     
    24222431    mkdir -p $mountpoint/proc
    24232432    echo "$BOOT_SIZE" > $mountpoint/tmp/$BOOT_SIZE.siz
     2433
     2434    echo "---------------------------" >> $LOGFILE
     2435    echo "Content of initial ramdisk:" >> $LOGFILE
     2436    echo "---------------------------" >> $LOGFILE
     2437    (cd $mountpoint ; ls -Rla ) >> $LOGFILE
     2438    echo "---------------------------" >> $LOGFILE
     2439
    24242440    # Determine what filesystem to use for initrd image
    24252441    echo "Call GetInitrdFilesystemToUse() with parameter ${kernelpath} to get filesystem to use for initrd." >> $LOGFILE
     
    26862702    elif [ "$1" = "--locatedeps" ] ; then
    26872703        [ ! "$2" ] && Die "Please specify the binary to look at"
    2688         LocateDeps $2
     2704        LocateDeps $*
    26892705        # Avoids logfile content for mondo
    26902706        export MONDO_SHARE=""
Note: See TracChangeset for help on using the changeset viewer.