Changeset 2446


Ignore:
Timestamp:
Oct 2, 2009, 4:30:13 AM (10 years ago)
Author:
bruno
Message:

r3515@localhost: bruno | 2009-10-02 03:59:06 +0200

  • Create a correct minimal boot for tools required. Resulting ISO still not ok due to init.
Location:
branches/2.2.10
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/mindi

    r2445 r2446  
    3535
    3636EXTRA_SPACE=60000       # increase if you run out of ramdisk space
    37 BOOT_SIZE=16384         # size of the boot disk
     37BOOT_SIZE=24576         # size of the boot disk
    3838
    3939PROMPT_MAKE_CD_IMAGE="yes"
     
    272272
    273273DropOptimizedLibraries() {
    274     local outdir filelist list_of_optimized_libraries optimized_lib_name vanilla_lib_name reason msg resolved res
     274    local outdir filelist list_of_optimized_libraries optimized_lib_name vanilla_lib_name reason msg resolved res progress
    275275    filelist=$1
    276276    outdir=$2
    277277
     278    progress=0
    278279    list_of_optimized_libraries=`grep "lib/i[5-7]86/" $filelist`
    279280    if [ "$list_of_optimized_libraries" = "" ] ; then
    280281        return 0
     282    else
     283        noof_lines=`echo $list_of_optimized_libraries | tr ' ' '\n' | wc -l`
    281284    fi
    282285    echo -en "Dropping i686-optimized libraries if appropriate"
    283286    for optimized_lib_name in $list_of_optimized_libraries ; do
    284         echo -en "."
    285287        reason=""
    286288        vanilla_lib_name=`echo "$optimized_lib_name" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'`
     
    303305            mv -f $filelist.tmp $filelist
    304306        done
     307        progress=$(($progress+1))
     308        LogProgress $progress $noof_lines
    305309    done
    306310    $AWK '{ print $1; }' $filelist | sort -u > $filelist.tmp
     
    794798# Give all symlinks recursively of a full path name
    795799ReadAllLink() {
    796     file="$1"
    797 
    798     echo $file | grep -q '\.\./'
    799     if [ $? -eq 0 ]; then
    800         # We need to normalise the path with .. in it
    801         file=`echo $file | perl -pi -e 's|([^/]+)/([^/]+)/\.\./([^/]+)|$1/$3|'`
    802     fi
    803     echo "$file"
    804     if [ ! -h $file ]; then
    805         return 0
    806     fi
    807 
    808     link=`readlink $file`
    809     d=`dirname $file`
    810     fchar=`echo $link | cut -c1`
    811     # If mother dir is a link print it
    812     if [ -h "$d" ]; then
    813         echo "$d"
    814         d=`readlink $d`
    815     fi
    816     if [ "$fchar" != "/" ]; then
    817         # Relative or local link
    818         ReadAllLink "$d/$link"
    819     else
    820         # Absolute path
    821         ReadAllLink $link
    822     fi
     800
     801    incoming="$*"
     802
     803    for file in $incoming ; do
     804        echo "$file"
     805        if [ ! -h $file ]; then
     806            continue
     807        fi
     808   
     809        link=`readlink -e $file`
     810        d=`dirname $file`
     811        fchar=`echo $link | cut -c1`
     812        # If mother dir is a link print it
     813        if [ -h "$d" ]; then
     814            echo "$d"
     815            d=`readlink -e $d`
     816        fi
     817        if [ "$fchar" != "/" ]; then
     818            # Relative or local link
     819            ReadAllLink "$d/$link"
     820        else
     821            # Absolute path
     822            ReadAllLink $link
     823        fi
     824    done
    823825}
    824826
     
    22422244    # We need a minimal conf in the initial ramdisk
    22432245    mountlis=`grep -v "^#.*" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | cut -d: -f2 | sort -u`
    2244     LocateDeps $mountlis >> $MINDI_TMP/busy.lis
     2246    ReadAllLink $mountlis > $MINDI_TMP/mnt.lis
     2247    LocateDeps `cat $MINDI_TMP/mnt.lis` >> $MINDI_TMP/deps.lis
    22452248    # Special for libs
    2246     for f in `grep -E "/lib" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | grep -v "^#.*" | cut -d: -f2`; do
    2247         echo "`ReadAllLink $f`" >> $MINDI_TMP/busy.lis
    2248     done
     2249    ReadAllLink `grep -E "/lib" $DEPLIST_FILE_MIN $DEPLIST_DIR/minimal*.conf | grep -v "^#.*" | cut -d: -f2` >> $MINDI_TMP/deps.lis
     2250
    22492251    # Initial / are trucated by tar
    2250     tar cf - $mountlis `sort -u $MINDI_TMP/busy.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in mount analysis" $MINDI_TMP/$$.log
    2251     rm -f $MINDI_TMP/busy.lis
     2252    tar cf - `cat $MINDI_TMP/mnt.lis` `sort -u $MINDI_TMP/deps.lis` 2>> $MINDI_TMP/$$.log | tar xf - || LogAll "Problem in mount analysis" $MINDI_TMP/$$.log
     2253    rm -f $MINDI_TMP/deps.lis
    22522254
    22532255    # Copy of files mandatory for ssh to automate mount if sshfs is used
     
    22702272    if [ $? -eq 0 ]; then
    22712273        echo "udev device manager found" > $mountpoint/tmp/USE-UDEV
    2272         LogAll "udev device manager found"
     2274        LogFile "udev device manager found"
    22732275        tar cf - -C / /etc/udev 2>> $MINDI_TMP/$$.log | tar xf -  || LogAll "Problem in /etc/udev analysis" $MINDI_TMP/$$.log
    22742276        # This avoids NIC remapping if on another machine at restore time on Debian at least
     
    22872289                    while [ -h $j ]; do
    22882290                        lis="$lis $j"
    2289                         j=`readlink $j`
     2291                        j=`readlink -f $j`
    22902292                    done
    22912293                    lis="$lis $j"
     
    24862488LogFile "$ARCH architecture detected"
    24872489LogFile "mindi called with the following arguments:"
    2488 LogFile "$@"
     2490LogFile "$*"
    24892491LogFile "Start date : `date`"
    24902492LogFile "-----------------------------"
     
    26952697    elif [ "$1" = "--readalllink" ] ; then
    26962698        [ ! "$2" ] && Die "Please specify the binary to look at"
    2697         ReadAllLink $2
     2699        shift
     2700        ReadAllLink $*
    26982701        # Avoids logfile content for mondo
    26992702        export MONDO_SHARE=""
  • branches/2.2.10/mindi/mindi-bkphw

    r2445 r2446  
    8989    close(SCRIPT);
    9090} else {
    91     print "WARNING: No Hardware support for $productname. Not a big issue, just less features and risks ;-)\n";
     91    print "\nWARNING: No Hardware support for $productname. Not a big issue, just less features and risks ;-)\n";
    9292    print "You may ask your manufacturer to contribute to the mindi project\n";
    9393}
  • branches/2.2.10/mondo/src/common/libmondo-devices.c

    r2444 r2446  
    16341634        log_msg(4, "I guess it's a partiion itself");
    16351635        mr_asprintf(partitions[0], "%s", dsf);
    1636         ndsf = truncate_to_drive_name(dsf);
     1636        mr_asprintf(tmp, "%s", dsf);
     1637        ndsf = truncate_to_drive_name(tmp);
     1638        mr_free(tmp);
    16371639    } else {
    16381640        /* Fill the partition list */
     
    18281830        mount_list = call_program_and_get_last_line_of_output(command);
    18291831        mr_free(command);
    1830 :w!
     1832
    18311833        log_msg(4, "  Software raid device list: %s", mount_list);
    18321834        /* Loop through the software raid device list to see if we can find the partition */
Note: See TracChangeset for help on using the changeset viewer.