Changeset 1764 for branches/2.2.5


Ignore:
Timestamp:
Nov 4, 2007, 1:30:52 AM (12 years ago)
Author:
bruno
Message:
  • perl is now required at restore time to support uuid swap partitions (and will be used for many other thigs in the future for sure)
  • next mindi version will be 2.0.0 due to all the changes made in it (udev may break working distros)
  • small optimization in mindi on keyboard handling (one single find instead of multiple)
  • better interaction for USB device when launching mindi manually
  • attempt to automatically guess block disk size for ramdisk
  • fix typos in bkphw
Location:
branches/2.2.5/mindi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/ChangeLog

    r1679 r1764  
    33MINDI CHANGES
    44
    5 1.2.5 (2007-10-11)
     52.0.0 (2007-10-11)
    66- Build process adapted to use pb http://trac.project-builder.org (Bruno Cornec)
    77- Really Fix #163 support for 3w-9xxx 3w_9xxx (Bruno Cornec)
  • branches/2.2.5/mindi/deplist.txt

    r1741 r1764  
    4646/usr/share/misc/file/magic /usr/share/file/magic
    4747
     48# For swap uudi support and probably then more in the future
     49/usr/bin/perl
     50
    4851# For Debug  mode
    4952# gdb
  • branches/2.2.5/mindi/mindi

    r1761 r1764  
    154154
    155155AddFileToDir() {
    156     local filename minidir_root noof_disks diskno res filesize disksize would_occupy zipsize complevel cutoff compressed_fname siz
     156    local filename minidir_root noof_disks diskno res filesize would_occupy zipsize complevel cutoff compressed_fname siz
    157157    filename=$1
    158158    minidir_root=$2
     
    212212    echo "Added kbd map $mappath" >> $LOGFILE
    213213    if [ ! -e "$mappath" ] ; then
    214         mappath=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"`
     214            mappath=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"`
    215215        if [ ! -e "$mappath" ] ; then
    216216            LogIt "Cannot add $mappath: kbd map file not found"
     
    230230    for included_item in $included_list ; do
    231231        if [ ! -e "$included_item" ] ; then
    232             sss=`find $KEYDIR/keymaps | grep -F "${included_item}.inc"`
    233             [ "$sss" = "" ] && sss=`find $KEYDIR/keymaps | grep -F "$included_item"`
     232                sss=`grep -F "${included_item}.inc" $MINDI_TMP/keymaps.find`
     233            [ "$sss" = "" ] && sss=`grep -F "$included_item" $MINDI_TMP/keymaps.find`
    234234            for ii in $sss ; do
    235235                [ -e "$ii" ] && AddKeyboardMappingFile $ii
     
    421421    mkdir -p $mountpoint
    422422    dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)"
    423     mke2fs -N 12 -F $imagefile >> $LOGFILE 2>> $LOGFILE
     423    echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE
     424    mke2fs -N 12 -F $imagefile >> $LOGFILE 2>> $LOGFILE || Die "Unable to create an ext2 file system on $imagefile"
    424425    mount -t ext2 -o loop $imagefile $mountpoint || Die "Can't loopmount $imagefile to $mountpoint! The reason may be missing support for loopfs or ext2 (or both) in the running kernel."
    425426    mv $tarball $mountpoint/
     
    573574    [ ! "$locale" ] && locale=`grep -E '^KEYMAP=' "$keyfile" | tr -d '"' |cut -d'=' -f2`        # Gentoo
    574575    echo "locale=$locale" >> $LOGFILE
    575     mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "/${locale}." | grep -vx " *#.*"`
    576     [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"`
     576    #
     577    # Process the keymaps dir once for all
     578    # AddKeyboardMappingFile will use it recursively
     579    #
     580    find $KEYDIR/keymaps > $MINDI_TMP/keymaps.find
     581    mp=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep -F "/${locale}." | grep -vx " *#.*"`
     582    [ ! "$mp" ] && mp=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"`
    577583    # If we have multiple keymaps then log it !!
    578584    echo "$mp" | grep -q " "
     
    599605    AddKeyboardMappingFile $mappath
    600606    echo -e "$DONE"
     607    rm -f $MINDI_TMP/keymaps.find
    601608    return 0
    602609}
     
    17071714    local i old_pwd
    17081715    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
    1709         echo "Shall I make a bootable USB image ?"
    1710         if [ "$USBDEVICE" != "" ]; then
    1711             echo -en "WARNING: This will erase all content on $USBDEVICE ([y]/n) "
    1712             read i
    1713             [ "$i" = "n" ] || [ "$i" = "N" ] && return 0
    1714         else
    1715             echo -en "WARNING: This will erase all content on $USBDEVICE (y/[n]) "
    1716             read i
    1717             [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
    1718         fi
     1716        echo "Shall I make a bootable USB image ? (y/[n] "
     1717        read i
     1718        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
     1719        if [ "$USBDEVICE" = "" ]; then
     1720            echo -en "Please enter the device name of your USB device (e.g. /dev/sda) : "
     1721            read dev
     1722            USBDEVICE=$dev
     1723        fi
     1724        echo "WARNING: This will erase all content on $USBDEVICE"
     1725        echo -en "Are you sure you want to use $USBDEVICE (y/[n]) "
    17191726    fi
    17201727    if [ _"$MINDI_TMP" = _"" ]; then
     
    23662373        tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "WARNING - error occurred while unzipping x11-tools.tgz"
    23672374    fi
    2368     if [ -e "$MONDO_SHARE/restore-scripts" ] ; then
     2375    if [ -e "$MONDO_SHARE/restore-scripts" ]; then
    23692376        cp -Rdf $MONDO_SHARE/restore-scripts/* . 2>> $LOGFILE
    23702377        [ "$?" -ne "0" ] && [ _"$MONDO_SHARE" != _"" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts"
     
    27552762    dd if=/dev/zero of=$tempfile bs=1k count=$ramdisk_size &> /dev/null || Die "Not enough room for temporary ramdisk (TurnTgzIntoRdz)"
    27562763    echo -en "..."
    2757     mke2fs -b 1024 -m 1 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE
     2764    echo "Creating ext2 filesystem on $tempfile" >> $LOGFILE
     2765    mke2fs -b 1024 -m 1 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE || Die "Unable to create an ext2 file system on $tempfile"
    27582766    echo -en "..."
    27592767    mkdir -p $mountpoint
     
    29362944        # unmount loop filesystem and create image file using the standard approach
    29372945        umount $mountpoint || Die "Cannot unmount $tempfile"
    2938         dd if=$tempfile bs=1k 2> /dev/null | gzip -v9 > $rdz_fname 2> /dev/null
     2946        dd if=$tempfile bs=1k 2> /dev/null > ${rdz_fname}.tmp 2> /dev/null
     2947        bs=`tune2fs -l ${rdz_fname}.tmp | grep -E '^Block size:' | cut -d: -f2`
     2948        ADDITIONAL_BOOT_PARAMS="$ADDITIONAL_BOOT_PARAMS ramdisk_blocksize=$bs"
     2949        gzip -v9 ${rdz_fname}.tmp > $rdz_fname 2> /dev/null
     2950        rm -f ${rdz_fname}.tmp
    29392951        # log that we are done
    29402952        echo "...done." >> $LOGFILE
     
    31553167    echo "-------------" >> $LOGFILE
    31563168    /usr/sbin/esxcfg-module -l >> $LOGFILE
    3157     MODULES="$MODULES `esxcfg-module -l | awk '{print $1}'`"
     3169    MODULES="$MODULES `/usr/sbin/esxcfg-module -l | awk '{print $1}'`"
    31583170fi
    31593171echo "-------------" >> $LOGFILE
  • branches/2.2.5/mindi/mindi-bkphw

    r1761 r1764  
    5858        if ($tool =~ /\/cpqacuxe$/) {
    5959            $ret = system("$tool -c $bkpdir/cpqacuxe.dat");
    60             print SCRIPT "$tool -r $bkpdir/cpqacuxe.dat)");
     60            print SCRIPT "$tool -r $bkpdir/cpqacuxe.dat");
    6161            print TOOLS "$tooldir/bld\n";
    6262        }
    6363        if ($tool =~ /\/hponcfg$/) {
    6464            $ret = system("$tool -w $bkpdir/hponcfg.dat");
    65             print SCRIPT "$tool -r $bkpdir/hponcfg.dat)");
     65            print SCRIPT "$tool -r $bkpdir/hponcfg.dat");
     66        }
     67        if ($tool =~ /\.scexe$/) {
     68            print SCRIPT "$tool");
    6669        }
    6770        if ($ret != 0) {
Note: See TracChangeset for help on using the changeset viewer.