Changeset 1880 for branches/2.2.5


Ignore:
Timestamp:
Jan 27, 2008, 9:24:51 PM (12 years ago)
Author:
bruno
Message:

CACHE_LOC => MINDI_CACHE (nearer from stable version, will ease future patches)

Location:
branches/2.2.5/mindi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi/mindi

    r1876 r1880  
    66# mindi - mini-Linux distro based on the user's filesystem & distribution
    77#
    8 # Mindi can create a multi-floppy boot/root kit. The first floppy is the boot
     8# Mindi can create a multi-image boot/root kit. The first image is the boot
    99# disk: it contains a kernel, a ramdisk etc. The second disk is data disk #1;
    1010# the third disk is data disk #2; and so it goes.
     
    1919
    2020#RUN_AFTER_INITIAL_BOOT_PHASE="echo \"Who lives in a pineapple under the sea?\" > /tmp/spongebob.squarepants.txt"
    21     # after booting from floppy/CD image but before
     21    # after booting from image/CD but before
    2222    # accessing auxiliary data disks (or the rest of
    2323    # the CD), the initscript will run the above command.
     
    8282LOGFILE=/var/log/mindi.log
    8383FDDEVICE=/dev/fd0             ; # 1.44MB floppy #0
    84 CACHE_LOC=/var/cache/mindi
     84MINDI_CACHE=/var/cache/mindi
    8585FORCE_DUAL_FLOPPIES=no
    8686BOOT_MEDIA_MESSAGE="\
     
    112112
    113113# Purge from potential old run
    114 rm -rf $CACHE_LOC/* 2> /dev/null
    115 mkdir -p $CACHE_LOC
     114rm -rf $MINDI_CACHE/* 2> /dev/null
     115mkdir -p $MINDI_CACHE
    116116# ----------------------------------------------------------------------------
    117117
     
    142142Aborted() {
    143143    trap SIGHUP SIGTERM SIGTRAP SIGINT
    144     [ "$CACHE_LOC" != "" ] && rm -f $CACHE_LOC/mindi*img $CACHE_LOC/*gz $CACHE_LOC/mindi.iso
     144    [ "$MINDI_CACHE" != "" ] && rm -f $MINDI_CACHE/mindi*img $MINDI_CACHE/*gz $MINDI_CACHE/mindi.iso
    145145    [ "$minidir_root" != "" ] && rm -Rf $minidir_root/*
    146146    Die "User abort."
     
    427427    if [ "$?" -ne "0" ] ; then
    428428        umount $mountpoint
    429         Die "Tarball $tarball is too big for disk! (CODI)\nTell Dev Team to adjust MAX_COMPRESSED_SIZE"
     429        rmdir $mountpoint
     430        Die "Tarball $tarball is too big for disk! (CODI)\nAdjust mindi_max_compressed_size in your $MINDI_CONFIG"
    430431    fi
    431432    [ "$diskno" -eq "$noof_disks" ] && echo "This is the last disk ($diskno=$noof_disks)" >> $mountpoint/LAST-DISK
     
    17171718    [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun .    2>> $LOGFILE
    17181719    if [ "$ARCH" != "ia64" ] ; then
    1719         mkisofs -U -J -r -o $CACHE_LOC/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log
    1720     else
    1721         mkisofs -J -r -o $CACHE_LOC/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
     1720        mkisofs -U -J -r -o $MINDI_CACHE/mindi.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table . > /dev/null 2> $MINDI_TMP/mkisofs.log
     1721    else
     1722        mkisofs -J -r -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
    17221723    fi
    17231724    if [ "$?" -ne "0" ] ; then
     
    17281729        LogIt "Failed to create ISO image."
    17291730    else
    1730         echo "Created bootable ISO image at $CACHE_LOC/mindi.iso" | tee -a $LOGFILE
     1731        echo "Created bootable ISO image at $MINDI_CACHE/mindi.iso" | tee -a $LOGFILE
    17311732    fi
    17321733    rm -f $MINDI_TMP/mkisofs.log
     
    20492050        t=vfat
    20502051    else
    2051         mke2fs -N 26 -m 0 -F $imagefile >> $LOGFILE 2>> $LOGFILE
     2052        echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE
     2053        mke2fs -N 26 -m 0 -F $imagefile &> /dev/null || Die "Unable to create an ext2 file system on $imagefile"
    20522054        t=ext2
    20532055    fi
     
    28802882
    28812883    # Management of potential HW info (Proliant only at the moment)
    2882     rm -rf $CACHE_LOC/bkphw
    2883     mindi-bkphw $CACHE_LOC $MINDI_CONF | tee -a $LOGFILE
    2884     if [ -d $CACHE_LOC/bkphw ]; then
     2884    rm -rf $MINDI_CACHE/bkphw
     2885    mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE
     2886    if [ -d $MINDI_CACHE/bkphw ]; then
    28852887        LogIt "Hardware Information found and saved ..."
    2886         cp -rp $CACHE_LOC/bkphw .
    2887         if [ -f $CACHE_LOC/tools.files ]; then
    2888             lis=`grep -Ev '^#' $CACHE_LOC/tools.files`
     2888        cp -rp $MINDI_CACHE/bkphw .
     2889        if [ -f $MINDI_CACHE/tools.files ]; then
     2890            lis=`grep -Ev '^#' $MINDI_CACHE/tools.files`
    28892891            LocateDeps $lis > $MINDI_TMP/tools.lis
    28902892            cp --parents -Rdf $lis `sort -u $MINDI_TMP/tools.lis` .
    28912893        fi
    2892         if [ -f $CACHE_LOC/mindi-rsthw ]; then
    2893             mv -f $CACHE_LOC/mindi-rsthw .
     2894        if [ -f $MINDI_CACHE/mindi-rsthw ]; then
     2895            mv -f $MINDI_CACHE/mindi-rsthw .
    28942896            chmod 755 ./mindi-rsthw
    28952897        fi
    2896         rm -f $MINDI_TMP/tools.lis $CACHE_LOC/tools.files
     2898        rm -f $MINDI_TMP/tools.lis $MINDI_CACHE/tools.files
    28972899    fi
    28982900
     
    33383340        mkdir -p $MINDI_TMP
    33393341        # This is the scratch dir in mondo - subdir images
    3340         CACHE_LOC=$3
    3341         if [ _"$CACHE_LOC" != _"" ]; then
    3342             mkdir -p $CACHE_LOC
     3342        MINDI_CACHE=$3
     3343        if [ _"$MINDI_CACHE" != _"" ]; then
     3344            mkdir -p $MINDI_CACHE
    33433345        fi
    33443346        kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath=""
     
    34023404        [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time"
    34033405        # MONDO_ROOT is the real scratchdir
    3404         MONDO_ROOT=`echo $CACHE_LOC | sed 's/\(.*\)\/.*/\1/'`
     3406        MONDO_ROOT=`echo $MINDI_CACHE | sed 's/\(.*\)\/.*/\1/'`
    34053407        if [ _"$MONDO_ROOT" != _"" ]; then
    34063408            mkdir -p $MONDO_ROOT
     
    35073509    YOUR_KERNEL_SUCKS="Your kernel sucks"
    35083510fi
    3509 echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$CACHE_LOC" >> $LOGFILE
     3511echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$MINDI_CACHE" >> $LOGFILE
    35103512[ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty..."
    35113513
    35123514[ "$YOUR_KERNEL_SUCKS" ] && [ ! "$FAILSAFE_KVER" ] && Die "Please install mindi-kernel package. You need it.\nGo to http://www.mondorescue.org and download it, then install it."
    35133515
    3514 PrepareDataDiskImages $CACHE_LOC
     3516PrepareDataDiskImages $MINDI_CACHE
    35153517noof_disks=$?
    35163518ramdisk_size=$(($size_of_all_tools+$EXTRA_SPACE))
     
    35203522echo "Ramdisk will be $ramdisk_size KB" >> $LOGFILE
    35213523if [ "$ARCH" = "ia64" ] ; then
    3522     PrepareBootDiskImage_LILO $CACHE_LOC $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppy disk image."
     3524    PrepareBootDiskImage_LILO $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppy disk image."
    35233525else
    35243526    if [ "$USE_LILO" = "yes" ] ; then
    3525         if ! PrepareBootDiskImage_LILO $CACHE_LOC 1722 $kernelpath $ramdisk_size ; then
     3527        if ! PrepareBootDiskImage_LILO $MINDI_CACHE 1722 $kernelpath $ramdisk_size ; then
    35263528            LogIt "WARNING - failed to create 1.72MB boot image."
    35273529            LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk."
    35283530        fi
    3529         if ! PrepareBootDiskImage_LILO $CACHE_LOC 2880 $kernelpath $ramdisk_size ;  then
     3531        if ! PrepareBootDiskImage_LILO $MINDI_CACHE 2880 $kernelpath $ramdisk_size ;  then
    35303532            LogIt "WARNING - failed to create 2.88MB floppy disk image."
    35313533            LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk."
    3532             PrepareBootDiskImage_LILO $CACHE_LOC $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."
    3533         fi
    3534     else
    3535         if ! PrepareBootDiskImage_SYSLINUX $CACHE_LOC 1722 $kernelpath $ramdisk_size ; then
     3534            PrepareBootDiskImage_LILO $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."
     3535        fi
     3536    else
     3537        if ! PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 1722 $kernelpath $ramdisk_size ; then
    35363538            LogIt "WARNING - failed to create 1.72MB boot image."
    35373539            LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk."
    3538             if ! PrepareBootDiskImage_SYSLINUX $CACHE_LOC 2880 $kernelpath $ramdisk_size ; then
     3540            if ! PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 2880 $kernelpath $ramdisk_size ; then
    35393541                LogIt "WARNING - failed to create 2.88MB floppy disk image."
    35403542                LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk."
    3541                 PrepareBootDiskImage_SYSLINUX $CACHE_LOC $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE kB floppy disk image."
     3543                PrepareBootDiskImage_SYSLINUX $MINDI_CACHE $BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create $BOOT_SIZE kB floppy disk image."
    35423544            fi
    35433545        fi
     
    35493551
    35503552if [ _"$MONDO_SHARE" = _"" ]; then
    3551     ListImagesForUser $CACHE_LOC
     3553    ListImagesForUser $MINDI_CACHE
    35523554    boot_dev=/dev/fd0u1722
    35533555    [ ! -e "$boot_dev" ] && mknod $boot_dev b 2 60
     
    35553557    [ ! -e "$boot_dev" ] && Die "Oh Lord, will you PLEASE tell the vendor to create the 1.72MB devices in /dev?"
    35563558    if [ "$PROMPT_WRITE_BOOT_FLOPPIES" = "yes" ]; then
    3557         OfferToCopyImagesToDisks $CACHE_LOC $boot_dev $FDDEVICE
     3559        OfferToCopyImagesToDisks $MINDI_CACHE $boot_dev $FDDEVICE
    35583560    fi
    35593561    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then
    3560         OfferToMakeBootableUSB $CACHE_LOC
    3561     fi
    3562     OfferToMakeBootableISO $CACHE_LOC
     3562        OfferToMakeBootableUSB $MINDI_CACHE
     3563    fi
     3564    OfferToMakeBootableISO $MINDI_CACHE
    35633565    LogIt "Finished."
    35643566elif [ "$TAPEDEV" ] ; then
    3565     OfferToMakeBootableISO $CACHE_LOC
    3566     if [ -e "$CACHE_LOC/all.tar.gz" ] ; then
    3567         cp -f $CACHE_LOC/all.tar.gz $MINDI_TMP/ 2>> $LOGFILE
     3567    OfferToMakeBootableISO $MINDI_CACHE
     3568    if [ -e "$MINDI_CACHE/all.tar.gz" ] ; then
     3569        cp -f $MINDI_CACHE/all.tar.gz $MINDI_TMP/ 2>> $LOGFILE
    35683570    else
    35693571        Die "Cannot find all.tar.gz, to be written to tape"
    35703572    fi
    35713573elif [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then
    3572     OfferToMakeBootableUSB $CACHE_LOC
     3574    OfferToMakeBootableUSB $MINDI_CACHE
    35733575else
    3574     OfferToMakeBootableISO $CACHE_LOC
     3576    OfferToMakeBootableISO $MINDI_CACHE
    35753577fi
    35763578# cleanup
  • branches/2.2.5/mindi/mindi-bkphw

    r1877 r1880  
    7777        }
    7878        if ($tool =~ /\.scexe$/) {
     79            print "Found $tool, that firmware will be applied at restore time on your HP Proliant\n";
    7980            print SCRIPT "$tool\n";
    8081        }
Note: See TracChangeset for help on using the changeset viewer.