Changeset 2438


Ignore:
Timestamp:
Sep 29, 2009, 2:41:36 PM (10 years ago)
Author:
bruno
Message:
  • Improvements on sshfs/ssh management in restore mode
  • Include now all minimal requirements for sshfs
Location:
branches/2.2.9/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/deplist.d/minimal.conf

    r2437 r2438  
    3939/usr/lib/libnss_files.so
    4040/usr/lib64/libnss_files.so
     41/etc/ssh
    4142/usr/bin/ulockmgr_server
    4243/sbin/mount.cifs
  • 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=""
  • branches/2.2.9/mindi/rootfs/etc/passwd

    r2433 r2438  
     1root::0:0::/:/bin/bash
    12halt:x:7:0:halt:/sbin:/sbin/halt
    23operator:x:11:0:operator:/:/bin/bash
    3 root::0:0::/:/bin/bash
    44shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
    55sync:x:5:0:sync:/sbin:/bin/sync
  • branches/2.2.9/mindi/rootfs/sbin/start-netfs

    r2380 r2438  
    8181    if [ "$proto" = "sshfs" ]; then
    8282        LogIt "Mounting SSHFS share ($netfsmount) on /tmp/isodir..."
    83         sshfs -o ro $netfsmount /tmp/isodir
     83        # We need a correct console for ssh
     84        ln -sf /dev/console /dev/tty
     85        sshfs -o ro,StrictHostKeyChecking=no $netfsmount /tmp/isodir
    8486    elif [ "$proto" != "" ]; then
    8587        LogIt "Mounting Network share ($netfsmount) on /tmp/isodir..."
Note: See TracChangeset for help on using the changeset viewer.