Changeset 1106 for trunk/mindi/mindi


Ignore:
Timestamp:
Feb 7, 2007, 11:55:11 PM (12 years ago)
Author:
bruno
Message:

merge -r1082:1105 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/mindi

    r1085 r1106  
    4848
    4949MINDI_CONFIG="$MINDI_CONF/mindi.conf"
    50 if [ ! -f $MINDI_CONFIG ]; then
     50if [ ! -f $MINDI_CONFIG ]  && [ "_$1" = "_" ]; then
    5151    echo "No $MINDI_CONFIG file found using sensible values"
    5252else
    53     echo "Using $MINDI_CONFIG as additional config file"
     53    if [ "_$1" = "_" ]; then
     54        echo "Using $MINDI_CONFIG as additional config file to $MINDI_CONFIG_DIST"
     55    fi
    5456    . $MINDI_CONFIG
    5557fi 
     
    8789PROMPT_MAKE_CD_IMAGE="$mindi_write_cd"
    8890PROMPT_MAKE_USB_IMAGE="$mindi_write_usb"
     91PROMPT_MAKE_TAPE_IMAGE="$mindi_write_tape"
    8992USE_OWN_KERNEL="$mindi_use_own_kernel"
    90 CACHE_LOC="$mindi_images_dir"
     93MINDI_CACHE="$mindi_cache_dir"
    9194FORCE_DUAL_FLOPPIES="$mindi_dual_floppies"
    9295TMPDIR="$mindi_tmp_dir"
    9396FDDEVICE="$mindi_fd_device"
     97USBDEVICE="$mindi_usb_device"
     98TAPEDEV="$mindi_tape_device"
    9499ADDITIONAL_BOOT_PARAMS="$mindi_boot_params"
    95100MY_FSTAB="$mindi_etc_fstab"
     
    107112BOOT_MEDIA_MESSAGE="$mindi_boot_msg"
    108113FDISK=$MINDI_SBIN/parted2fdisk
    109 
    110 # Now we can create what we nedd
    111114MINDI_TMP=`mktemp -d $TMPDIR/mindi.XXXXXXXXXX`
    112 mkdir -p $MINDI_TMP
    113 
    114 # Purge from potential old run
    115 rm -rf $CACHE_LOC/* 2> /dev/null
    116 mkdir -p $CACHE_LOC
     115
    117116# ----------------------------------------------------------------------------
    118117
     
    143142Aborted() {
    144143    trap SIGHUP SIGTERM SIGTRAP SIGINT
    145     [ "$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
    146145    [ "$minidir_root" != "" ] && rm -Rf $minidir_root/*
    147146    Die "User abort."
    148 }
    149 
    150 
    151 AddFileToCfgIfExists() {
    152     [ -e "$1" ] && echo -en "$2 `cat $1`\n" >> $3
    153147}
    154148
     
    415409    if [ "$?" -ne "0" ] ; then
    416410        umount $mountpoint
     411        rmdir $mountpoint
    417412        Die "Tarball $tarball is too big for disk! (CODI)\nAdjust mindi_max_compressed_size in your $MINDI_CONFIG"
    418413    fi
     
    522517        echo -en "Adding the following keyboard mapping tables: "
    523518        mkdir -p $bigdir/tmp
    524         echo "/etc/console/boottime.kmap.gz" > $bigdir/tmp/KEYMAP-LIVES-HERE
     519        echo "keymap-lives-here /etc/console/boottime.kmap.gz" > $MINDI_TMP/mondo-restore.cfg
    525520        KBDEPTH=0
    526521        mkdir -p $bigdir/etc/console
     
    573568    echo -en "Adding the following keyboard mapping tables: "
    574569    mkdir -p $bigdir/tmp
    575     echo "$mappath" > $bigdir/tmp/KEYMAP-LIVES-HERE
     570    echo "keymap-lives-here $mappath" > $MINDI_TMP/mondo-restore.cfg
    576571    KBDEPTH=0
    577572    AddKeyboardMappingFile $mappath
     
    787782            Die "Odd."
    788783        fi
    789         cp -f $MINDI_TMP/BOOTLOADER.* $bigdir 2> /dev/null || LogIt "\nMondo v1.2x defaults to LILO as the bootloader, BTW."
    790         if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    791             LogIt "Incorporating NFS-related settings"
    792             for r in NFS-* ISO-PREFIX ; do
    793                 cp -f $MINDI_TMP/$r $bigdir/tmp 2>> $LOGFILE || Die "Cannot copy $r - did you run out of disk space?"
    794                 echo "Copying $r to ramdisk" >> $LOGFILE
    795             done
    796         fi
    797784    fi
    798785    tr ' ' '\n' < $outfile.pre | tr -s '/' '/' | grep -Fvx "" | sort -u | grep -Ev "/libX11|/libXext|/libXi|/libgtk|/libgdk" > $outfile
     
    838825}
    839826
     827
     828# Check kernel filesystem capabilites for accessing initrd image
     829#
     830# Interface definition:
     831# param #1: absolute path to kernel image
     832GetInitrdFilesystemToUse() {
     833
     834    # interface test: make sure we have one parameter
     835    if [ $# -ne 1 ]; then
     836        Die "GetInitrdFilesystemToUse(): Expected 1 parameter, got $#."
     837    fi
     838
     839    # interface parameters
     840    local lvKernelImage=$1
     841
     842    # local constants (filesystem magic strings)
     843    local lcMagicCramfs="<3>cramfs: wrong magic"
     844    local lcMagicExt2fs="<3>EXT2-fs: blocksize too small for device."
     845    local lcMagicInitfs="<6>checking if image is initramfs..."
     846
     847    # local variables
     848    local lvOffset
     849    local lvScanRes
     850    local lvUseFilesystem
     851
     852    # say where we are.
     853    LogIt "  GetInitrdFilesystemToUse(): called with parameter: $lvKernelImage.\n"
     854
     855    # verify that file exists
     856    [ ! -f $lvKernelImage ] && Die "File $lvKernelImage not found. Terminating."
     857
     858    # get offet of gzip magic "1f8b0800" in file
     859    lvOffset=`od -vA n -t x1 $lvKernelImage | tr -d '[:space:]' | awk '{ print match($0, "1f8b0800")}'`
     860    [ $lvOffset -eq 0 ] && Die "gzip magic not found in file $lvKernelImage. Terminating."
     861    lvOffset=`expr $lvOffset / 2`
     862    LogIt "  GetInitrdFilesystemToUse(): gzip magic found at lvOffset $lvOffset.\n"
     863
     864    # scan kernel image for initrd filessystem support
     865    lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c | strings | grep -e "$lcMagicCramfs" -e "$lcMagicExt2fs" -e "$lcMagicInitfs"`
     866
     867    # determine which filesystem to use for initrd image: ext2fs, gzip'ed cpio (initramfs ) or cramfs
     868    if [ `echo $lvScanRes | grep -c "$lcMagicExt2fs"` -eq 1 ]; then
     869        lvUseFilesystem="ext2fs"
     870    elif [ `echo $lvScanRes | grep -c "$lcMagicInitfs"` -eq 1 ]; then
     871        lvUseFilesystem="initramfs"
     872    elif [ `echo $lvScanRes | grep -c "$lcMagicCramfs"` -eq 1 ]; then
     873        lvUseFilesystem="cramfs"
     874    else
     875        lvUseFilesystem="UNSUPPORTED"
     876    fi
     877
     878    # say what we are using
     879    LogIt "  GetInitrdFilesystemToUse(): Filesytem to use for initrd is $lvUseFilesystem.\n"
     880
     881    # return file system to use
     882    echo "$lvUseFilesystem"
     883
     884}
    840885
    841886# Searches parent raid device of given disk device
     
    10051050
    10061051
    1007 # Called by TurnTgzIntoRdz, to make /tmp/mondo-restore.cfg
    1008 MakeMondoConfigFile() {
    1009     local outfile use_lzo use_comp use_star
    1010     outfile=$1
    1011     > $outfile
    1012     [ "$TAPESIZE" ]     && echo "media-size $TAPESIZE" >> $outfile
    1013     [ "$TAPEDEV" ]          && echo "media-dev $TAPEDEV" >> $outfile
    1014     [ "$FILES_IN_FILELIST" ]    && echo "files-in-filelist $FILES_IN_FILELIST" >> $outfile
    1015     [ "$LAST_FILELIST_NUMBER" ] && echo "last-filelist-number $LAST_FILELIST_NUMBER" >> $outfile
    1016     [ "$INTERNAL_TAPE_BLOCK_SIZE" ] && echo "internal-tape-block-size $INTERNAL_TAPE_BLOCK_SIZE" >> $outfile
    1017     use_lzo=$USE_LZO; [ "$use_lzo" = "" ] && use_lzo="no"
    1018     use_gzip=$USE_GZIP; [ "$use_gzip" = "" ] && use_gzip="no"
    1019     use_comp=$USE_COMP; [ "$use_comp" = "" ] && use_comp="yes"
    1020     use_star=$USE_STAR; [ "$use_star" = "" ] && use_star="no"
    1021     echo "use-lzo $use_lzo" >> $outfile
    1022     echo "use-gzip $use_gzip" >> $outfile
    1023     echo "use-star $use_star" >> $outfile
    1024     echo "use-comp $use_comp" >> $outfile
    1025     echo "datestamp `date`" >> $outfile
    1026     [ "$ESTIMATED_TOTAL_NOOF_SLICES" ] && echo "total-slices $ESTIMATED_TOTAL_NOOF_SLICES" >> $outfile
    1027     AddFileToCfgIfExists $MINDI_TMP/NFS-CLIENT-IPADDR nfs-client-ipaddr $outfile
    1028     AddFileToCfgIfExists $MINDI_TMP/NFS-CLIENT-NETMASK nfs-client-netmask $outfile
    1029     AddFileToCfgIfExists $MINDI_TMP/NFS-CLIENT-BROADCAST nfs-client-broadcast $outfile
    1030     AddFileToCfgIfExists $MINDI_TMP/NFS-CLIENT-DEFGW  nfs-client-defgw  $outfile
    1031     AddFileToCfgIfExists $MINDI_TMP/NFS-SERVER-MOUNT  nfs-server-mount  $outfile
    1032     AddFileToCfgIfExists $MINDI_TMP/NFS-SERVER-PATH   nfs-server-path   $outfile
    1033     AddFileToCfgIfExists $MINDI_TMP/NFS-DEV           nfs-dev           $outfile
    1034     AddFileToCfgIfExists $MINDI_TMP/NFS-SERVER-IPADDR nfs-server-ipaddr $outfile
    1035     AddFileToCfgIfExists $MINDI_TMP/ISO-DEV           iso-dev           $outfile
    1036     AddFileToCfgIfExists $MINDI_TMP/ISO-MNT           iso-mnt           $outfile
    1037     AddFileToCfgIfExists $MINDI_TMP/ISO-PREFIX        iso-prefix        $outfile
    1038     AddFileToCfgIfExists $MINDI_TMP/ISODIR            isodir            $outfile
    1039     AddFileToCfgIfExists $MINDI_TMP/BOOTLOADER.DEVICE bootloader.device $outfile
    1040     AddFileToCfgIfExists $MINDI_TMP/BOOTLOADER.NAME   bootloader.name   $outfile
    1041     AddFileToCfgIfExists $MINDI_TMP/KEYMAP-LIVES-HERE keymap-lives-here $outfile
    1042     AddFileToCfgIfExists $MINDI_TMP/TAPEDEV-HAS-DATA-DISKS tapedev-has-data-disks $outfile
    1043     AddFileToCfgIfExists $MINDI_TMP/BACKUP-MEDIA-TYPE backup-media-type $outfile
    1044     AddFileToCfgIfExists $MINDI_TMP/DIFFERENTIAL      differential      $outfile
    1045     AddFileToCfgIfExists $MINDI_TMP/ACL      acl      $outfile
    1046     AddFileToCfgIfExists $MINDI_TMP/XATTR      xattr      $outfile
    1047 }
    1048 
    1049 
    10501052MakeModuleLoadingScript() {
    10511053    local module fname params modpath kver outerloop i modpaths kver searchpath list_to_echo j
     
    11321134    [ -e "$MY_FSTAB" ] || Die "Cannot find your fstab file ($MY_FSTAB)"
    11331135
    1134     rm -f $mountlist
    1135     mkdir -p $mountlist
    1136     rm -Rf $mountlist
     1136    [ "$mountlist" != "" ] && rm -Rf $mountlist
    11371137    > $mountlist
    11381138    echo -en "\rHang on...\r"
     
    14461446    rm -f $1.tmp
    14471447    if [ "$CDRECOVERY" != "yes" ] ; then
    1448         if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1448        if [ "$NFS_DEV" != "" ] ; then
    14491449            echo -en "Press <enter> to continue.\n" >> $1
    14501450        elif [ ! "$MINDI_TMP" ] ; then
     
    15301530        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
    15311531    fi
    1532     if [ ! "$MINDI_TMP" ] ; then
    1533         LogIt "NB: Mindi's bootable CD always uses isolinux or elilo."
    1534         LogIt "For a bootable CD w/LILO, please use Mondo."
     1532    if [ _"$MINDI_TMP" = _"" ]; then
     1533        Die "MINDI_TMP undefined"
    15351534    fi
    15361535    rm -Rf $MINDI_TMP/iso
     
    15631562    cd $MINDI_TMP/iso/isolinux
    15641563    cat $iso_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/iso > isolinux.cfg || Die "Cannot copy isolinux.cfg to $MINDI_TMP/iso/isolinux - did you run out of disk space?"
    1565     if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1564    if [ "$NFS_DEV" != "" ] ; then
    15661565        perl -pi -e 's/interactive/iso/' isolinux.cfg
    15671566    fi
     
    15761575            cp -f $MONDO_SHARE/autorun . 2>> $LOGFILE
    15771576        fi
    1578         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
    1579     else
    1580         mkisofs -J -r -o $CACHE_LOC/mindi.iso -b images/mindi-bootroot.$IA64_BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
     1577        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
     1578    else
     1579        mkisofs -J -r -o $MINDI_CACHE/mindi.iso -b images/mindi-bootroot.$IA64_BOOT_SIZE.img -c isolinux/boot.cat -no-emul-boot . > /dev/null 2> $MINDI_TMP/mkisofs.log
    15811580    fi
    15821581    if [ "$?" -ne "0" ] ; then
     
    15871586        LogIt "Failed to create ISO image."
    15881587    else
    1589         echo "Created bootable ISO image at $CACHE_LOC/mindi.iso" >> $LOGFILE
     1588        echo "Created bootable ISO image at $MINDI_CACHE/mindi.iso" >> $LOGFILE
    15901589    fi
    15911590    rm -f $MINDI_TMP/mkisofs.log
     
    15981597    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
    15991598        echo "Shall I make a bootable USB image ?"
    1600         echo -en "WARNING: This will erase all content on $USBDEV (y/[n]) "
     1599        echo -en "WARNING: This will erase all content on $USBDEVICE (y/[n]) "
    16011600        read i
    16021601        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
    16031602    fi
     1603    if [ _"$MINDI_TMP" = _"" ]; then
     1604        Die "MINDI_TMP undefined"
     1605    fi
    16041606    rm -Rf $MINDI_TMP/usb
    16051607    mkdir -p $MINDI_TMP/usb
    1606     USBPART="${USBDEV}1"
    1607 
    1608     echo -en "Transforming $USBDEV in a Bootable device "
     1608    USBPART="${USBDEVICE}1"
     1609
     1610    echo -en "Transforming $USBDEVICE in a Bootable device "
    16091611    echo -en "."
    1610     echo "Transforming $USBDEV in a Bootable device"  >> $LOGFILE
    1611     echo "Checking $USBDEV" >> $LOGFILE
    1612     $FDISK -l $USBDEV 2>&1 >> $LOGFILE
     1612    echo "Transforming $USBDEVICE in a Bootable device"  >> $LOGFILE
     1613    echo "Checking $USBDEVICE" >> $LOGFILE
     1614    $FDISK -l $USBDEVICE 2>&1 >> $LOGFILE
    16131615    if [ $? -ne 0 ]; then
    1614         echo "Unable to access $USBDEV" | tee -a $LOGFILE
     1616        echo "Unable to access $USBDEVICE" | tee -a $LOGFILE
    16151617        echo "Make sure your USB device is pluged in" | tee -a $LOGFILE
    16161618        MindiExit -1
    16171619    fi
    16181620    echo -en "."
    1619     echo "Erasing $USBDEV" >> $LOGFILE
    1620     $FDISK $USBDEV 2>&1 >> $LOGFILE << EOF
     1621    echo "Erasing $USBDEVICE" >> $LOGFILE
     1622    $FDISK $USBDEVICE 2>&1 >> $LOGFILE << EOF
    16211623d
    16221624d
     
    16351637EOF
    16361638    if [ $? -ne 0 ]; then
    1637         echo "Unable to create a vfat Filesystem on $USBDEV" | tee -a $LOGFILE
     1639        echo "Unable to create a vfat Filesystem on $USBDEVICE" | tee -a $LOGFILE
    16381640        echo "Make sure your USB device is pluged in" | tee -a $LOGFILE
    1639         $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1641        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    16401642        MindiExit -1
    16411643    fi
     
    16461648        echo "Unable to create a vfat filesystem on $USBPART" | tee -a $LOGFILE
    16471649        echo "Make sure your USB device is pluged in and partitioned ($USBPART must exist on it)" | tee -a $LOGFILE
    1648         $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1650        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    16491651        MindiExit -1
    16501652    fi
     
    16551657        echo "Unable to mount $USBPART on $MINDI_TMP/usb" | tee -a $LOGFILE
    16561658        echo "Make sure your USB device is pluged in, partitioned and formated ($USBPART must exist on it)" | tee -a $LOGFILE
    1657         $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1659        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    16581660        MindiExit -1
    16591661    fi
     
    16931695    cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/usb > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to $MINDI_TMP/usb - did you run out of disk space?"
    16941696    echo -en "."
    1695     if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1697    if [ "$NFS_DEV" != "" ] ; then
    16961698        perl -pi -e 's/interactive/iso/' syslinux.cfg
    16971699    fi
     
    17171719    else
    17181720        echo -e "$DONE"
    1719         echo "Created bootable USB image on $USBDEV" >> $LOGFILE
     1721        echo "Created bootable USB image on $USBDEVICE" >> $LOGFILE
    17201722    fi
    17211723    rm -f $MINDI_TMP/syslinux.log
     1724    #
     1725    # If mondoarchive, then tranfer $MINDI_CACHE content to the USB device
     1726    # and mount that device under that mountpoint instead
     1727    # Has to be done at the end here.
     1728    #
     1729    if [ _"$MONDO_SHARE" != _"" ]; then
     1730        mount $USBPART $MINDI_TMP/usb 2>> $LOGFILE
     1731        mv $MINDI_CACHE/* $MINDI_TMP/usb
     1732        umount $MINDI_TMP/usb
     1733        mount $USBPART $MINDI_CACHE
     1734    fi
    17221735}
    17231736
     
    17391752        if [ _"$MONDO_SHARE" != _"" ]; then
    17401753            if [ "$CDRECOVERY" != "yes" ] ; then
    1741                 if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1754                if [ "$NFS_DEV" != "" ] ; then
    17421755                    echo -en "Press <enter> to continue.\n"
    17431756                elif [ ! "$MINDI_TMP" ] ; then
     
    18341847        echo -en "default=RESTORE\n"
    18351848    elif [ "$disksize" -gt "2880" ] && [ _"$MONDO_SHARE" != _"" ]; then
    1836         if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1849        if [ "$NFS_DEV" != "" ] ; then
    18371850            echo -en "default=iso\n"
    18381851        else
     
    18551868    elif [ "$disksize" -gt "2880" ] ; then
    18561869        if [ _"$MONDO_SHARE" != _"" ]; then
    1857             if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1870            if [ "$NFS_DEV" != "" ] ; then
    18581871                options="iso"
    18591872            else
     
    19751988
    19761989    # copy the kernel across
    1977     rm -Rf $mountpoint/lost+found
     1990    [ "$mountpoint" != "" ] && rm -Rf $mountpoint/lost+found
    19781991    dd if=/dev/zero of=$mountpoint/zero bs=1k count=16 &> /dev/null
    19791992    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
     
    20112024    if [ "$disksize" -gt "2880" ] && [ ! "$KERN_DISK_MADE" ] ; then
    20122025        if [ "$ARCH" != "ia64" ] ; then
    2013         $LILO_EXE $LILO_OPTIONS -r $mountpoint >> $LOGFILE 2>> $LOGFILE
     2026        $LILO_EXE -r $mountpoint >> $LOGFILE 2>> $LOGFILE
    20142027        else
    20152028            /bin/true
     
    20962109    [ -e "$sys_cfg_file" ] || Die "Obi Wan, word up?"
    20972110    cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $mountpoint > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root"
    2098     if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     2111    if [ "$NFS_DEV" != "" ] ; then
    20992112        perl -pi -e 's/interactive/iso/' syslinux.cfg
    21002113    fi
     
    21152128
    21162129    # copy the kernel across
    2117     rm -Rf $mountpoint/lost+found
     2130    [ "$mountpoint" != "" ] && rm -Rf $mountpoint/lost+found
    21182131    dd if=/dev/zero of=$mountpoint/zero bs=1k count=16 &> /dev/null
    21192132    free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`
     
    22262239    mkdir -p $bigdir/tmp
    22272240    if [ _"$MONDO_SHARE" != _"" ]; then
    2228         MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    2229         cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null
     2241        cp -f $MONDO_CACHE/mondo-restore.cfg $bigdir/tmp &> /dev/null
    22302242    fi
    22312243    [ -d "/mnt/.boot.d" ] && echo "Oh Jebus" > $bigdir/tmp/DUMBASS-GENTOO
     
    22422254
    22432255    # master boot record, too
    2244     i=`cat $MINDI_TMP/BOOTLOADER.DEVICE 2> /dev/null`
     2256    i=`grep bootloader.device $MONDORESTORECFG | cut -d' ' -f2 2> /dev/null`
    22452257    if [ "$i" ] ; then
    22462258        LogIt "Backing up $i's MBR"
     
    24372449    bigdir=$1
    24382450    minidir_root=$2
    2439     rm -Rf $minidir_root/*
     2451    [ "$minidir_root" != "" ] && rm -Rf $minidir_root/*
    24402452
    24412453    TryToFitDataIntoSeveralDirs $bigdir $minidir_root
     
    24462458    fi
    24472459    RejigHyperlinks $minidir_root $noof_disks
    2448     rm -Rf $bigdir/*
     2460    [ "$bigdir" != "" ] && rm -Rf $bigdir/*
    24492461    return $noof_disks
    24502462}
     
    26242636    cd $old_pwd
    26252637    echo -en "\rThe files have been subdivided into $noof_disks directories.                                                            \r"
    2626     rm -Rf $minidir_root/compressed
     2638    [ "$minidir_root" != "" ] && rm -Rf $minidir_root/compressed
    26272639    if [ "$retval" -gt "0" ] ; then
    26282640        return 0
     
    27162728        list_of_groovy_mods="$CDROM_MODS `WhichOfTheseModulesAreLoaded "$SCSI_MODS"`"
    27172729    fi
    2718     if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     2730    if [ "$NFS_DEV" != "" ] ; then
    27192731        # For PXE boot
    27202732        list_of_groovy_mods="$list_of_groovy_mods $NET_MODS"
     
    27392751    fi
    27402752    cd $old_pwd
    2741     [ "$TAPEDEV" ] && echo -en "$TAPEDEV" > $mountpoint/tmp/TAPEDEV-LIVES-HERE
     2753    [ "$PROMPT_MAKE_TAPE_IMAGE" = "yes" ] && echo -en "$TAPEDEV" > $mountpoint/tmp/TAPEDEV-LIVES-HERE
    27422754    dd if=/dev/zero of=$mountpoint/zero &> /dev/null
    27432755    rm -f $mountpoint/zero
     2756    mkdir -p $mountpoint/tmp
    27442757    if [ _"$MONDO_SHARE" != _"" ]; then
    2745         MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg
    2746         cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP &> /dev/null
     2758        cp -f $MONDO_CACHE/mondo-restore.cfg $mountpoint/tmp &> /dev/null || Die "Cannot copy mondo-restore.cfg to ramdisk"
    27472759        cp -f $MINDI_TMP/mountlist.txt $mountpoint/tmp/ 2>/dev/null || Die "Cannot copy mountlist to ramdisk"
    2748         echo -en "$FILES_IN_FILELIST" > $mountpoint/tmp/FILES-IN-FILELIST
    2749         echo -en "$LAST_FILELIST_NUMBER" > $mountpoint/tmp/LAST-FILELIST-NUMBER
    2750         [ "$USE_LZO" = "yes" ] && echo -en "Pras 4 Pres 2004" >> $mountpoint/tmp/USING-LZO
    2751         [ "$USE_GZIP" = "yes" ] && echo -en "YES" >> $mountpoint/tmp/USING-GZIP
    2752         [ "$USE_COMP" = "yes" ] && echo -en "Compression, yep" >> $mountpoint/tmp/USING-COMP
    2753         [ "$USE_STAR" = "yes" ] && echo -en "Using star. Hooray." >> $mountpoint/tmp/USING-STAR
    2754     fi
    2755     mkdir -p $mountpoint/tmp
     2760    fi
    27562761    mkdir -p $mountpoint/proc
    27572762    echo "$disksize" > $mountpoint/tmp/$disksize.siz
    27582763    find $mountpoint -name CVS -exec rm -rf '{}' \;
    2759     umount $mountpoint || Die "Cannot unmount $tempfile"
    2760     dd if=$tempfile bs=1k 2> /dev/null | gzip -v9 > $rdz_fname 2> /dev/null
    2761 #    gzip -9 $tempfile
    2762 #    mv $tempfile.gz $rdz_fname
     2764    # Determine what filesystem to use for initrd image
     2765    LogIt "Call GetInitrdFilesystemToUse() with parameter ${kernelpath} to get filesystem to use for initrd.\n"
     2766    gvFileSystem=`GetInitrdFilesystemToUse ${kernelpath}`
     2767    [ -z  gvFileSystem ] && Die "GetFilesystemToUse() failed. Terminating."
     2768    case "$gvFileSystem" in
     2769    "ext2fs")
     2770        # say what will be used
     2771            LogIt "Creating an ext2 initrd image..."
     2772        # kernel expects linuxrc in ext2 filesystem
     2773        ( cd $mountpoint && ln -s sbin/init linuxrc )
     2774        # unmount loop filesystem and create image file using the standard approach
     2775        umount $mountpoint || Die "Cannot unmount $tempfile"
     2776        dd if=$tempfile bs=1k 2> /dev/null | gzip -v9 > $rdz_fname 2> /dev/null
     2777        # log that we are done
     2778            LogIt "done.\n"
     2779    ;;
     2780    "initramfs")
     2781        # say what will be used
     2782            LogIt "Creating a gzip'ed cpio (AKA initramfs) initrd image..."
     2783        # make sure that cpio is there
     2784        which cpio &> /dev/null; [ $? -eq 0 ] || Die "cpio not found. Please install package cpio and try again."
     2785        # go into filesystem
     2786        cd $mountpoint
     2787        # kernel expects init in cpio filesystem
     2788        ln -s sbin/init init
     2789        # create cpio image file and unmount loop filesystem
     2790        find . -print | cpio -o -H newc | gzip -9 > $old_pwd/$rdz_fname 2> /dev/null
     2791        cd $old_pwd
     2792        umount $mountpoint || Die "Cannot unmount $tempfile"
     2793        # log that we are done
     2794            LogIt "done.\n"
     2795    ;;
     2796    *)
     2797        Die "Filesystem $gvFileSystem not supported for initrd image. Terminating."
     2798    ;;
     2799    esac
    27632800    if [ "$res" -eq "0" ] ; then
    27642801        echo -en "..."
     
    28062843        done
    28072844        mkdir -p $minidir_root/all/tmp
    2808         echo -en "$FILES_IN_FILELIST" > $minidir_root/all/tmp/FILES-IN-FILELIST 2> /dev/null
    2809         echo -en "$LAST_FILELIST_NUMBER" > $minidir_root/all/tmp/LAST-FILELIST-NUMBER 2> /dev/null
    28102845    fi
    28112846    tar -b 4096 -cf - * 2> /dev/null | gzip -9 > $tardir/all.tar.gz
     
    28132848    [ "`du -sm $imagesdir/all.tar.gz | cut -f1`" -ge "30" ] && Die "You have too many tools in your shed"
    28142849    cd $old_pwd
    2815     rm -Rf $minidir_root
     2850    [ "$minidir_root" != "" ] && rm -Rf $minidir_root
    28162851    echo -e "$DONE"
    28172852}
     
    28212856#----------------------------------- Main -----------------------------------#
    28222857##############################################################################
     2858
     2859# Now we can create what we nedd
     2860mkdir -p $MINDI_TMP
     2861
     2862# Purge from potential old run
     2863if [ _"$MINDI_CACHE" = _"" ]; then
     2864    Die "MINDI_CACHE undefined"
     2865fi
     2866rm -rf $MINDI_CACHE 2> /dev/null
     2867mkdir -p $MINDI_CACHE
    28232868
    28242869
     
    28372882echo "$@" >> $LOGFILE
    28382883echo "Start date : `date`" >> $LOGFILE
     2884echo "-----------------------------" >> $LOGFILE
    28392885
    28402886if [ -e "/etc/conf.modules" ] && [ ! -e "/etc/modules.conf" ] ; then
     
    28462892# Log some capital variables
    28472893[ "$MINDI_PREFIX" = "XXX" ] && Die "Mindi has not been installed correctly."
     2894echo "MONDO_SHARE = $MONDO_SHARE" >> $LOGFILE
    28482895echo "MINDI_LIB = $MINDI_LIB" >> $LOGFILE
    28492896echo "MINDI_SBIN = $MINDI_SBIN" >> $LOGFILE
    28502897[ "$MINDI_CONF" = "YYY" ] && Die "Mindi has not been installed correctly."
    28512898echo "MINDI_CONF = $MINDI_CONF" >> $LOGFILE
    2852 echo "MONDO_SHARE = $MONDO_SHARE" >> $LOGFILE
     2899if [ -f $MINDI_CONF ]; then
     2900    echo "-----------------------------" >> $LOGFILE
     2901    echo " Mindi configuration file    " >> $LOGFILE
     2902    echo "-----------------------------" >> $LOGFILE
     2903    cat $MINDI_CONF >> $LOGFILE
     2904    echo "-----------------------------" >> $LOGFILE
     2905fi
     2906
    28532907
    28542908trap AbortHere SIGTERM SIGHUP SIGQUIT SIGKILL SIGABRT SIGINT
     
    29222976BIGNO=0
    29232977MAX_COMPRESSED_SIZE="$mindi_max_compressed_size"
     2978
     2979#
     2980# Kernel management: Attempt to locate kernel specific module path
     2981# if module path is found then use it other wise use uname -r to set it...
     2982#
     2983#
    29242984kernelpath="$mindi_kernel"
    29252985if [ "$kernelpath" = "NATIVE" ]; then
    29262986    kernelpath=""
    29272987fi
    2928 if [ "$ARCH" = "ia64" ] ; then
    2929     USE_LILO=yes
     2988if [ "$kernelpath" = "" ]; then
     2989    kernelpath=`TryToFindKernelPath`
     2990fi
     2991kernelname=`echo $kernelpath | cut -d'-' -f2-`
     2992echo "kernelname = $kernelname" >> $LOGFILE
     2993echo "kernelpath = $kernelpath" >> $LOGFILE
     2994if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
     2995then
     2996   echo "Module path for ${kernelpath} not found..." >> $LOGFILE
     2997   echo "using running kernel\'s modules." >> $LOGFILE
     2998   kernelname=`uname -r`
    29302999else
    2931     USE_LILO=no
     3000   echo "Using modules for kernel: ${kernelname}" >> $LOGFILE
    29323001fi
    29333002
     
    29733042    if [ "$1" = "--usb" ] ; then
    29743043        shift
    2975         USBDEV=$1
    2976         if [ _"$USBDEV" = _"" ]; then
     3044        USBDEVICE=$1
     3045        if [ _"$USBDEVICE" = _"" ]; then
    29773046            Die "No USB device specified"
    29783047        fi
     
    29803049    fi
    29813050fi
     3051
     3052#
     3053# Default value for parameters coming from mondo potentially
     3054#
     3055if [ "$ARCH" = "ia64" ] ; then
     3056    USE_LILO=yes
     3057else
     3058    USE_LILO=no
     3059fi
     3060
     3061#
     3062# These variables are normaly only significant in a mondo environment
     3063# Not enforced yet
     3064#
     3065CDRECOVERY="no"
     3066NOT_BOOT="no"
     3067EXCLUDE_DEVS=""
     3068IMAGE_DEVS=""
     3069NFS_DEV=""
    29823070
    29833071#
     
    30003088        echo "Mindi v$MINDI_VERSION"
    30013089        MindiExit 0
    3002     elif [ "$#" -ge "9" ] && [ "$1" = "--custom" ] ; then
     3090    elif [ "$1" = "--custom" ] ; then
    30033091        if [ _"$MONDO_SHARE" = _"" ]; then
    30043092            Die "--custom is reserved for mondoarchive calls"
     
    30123100        mkdir -p $MINDI_TMP
    30133101        # This is the scratch dir in mondo
    3014         CACHE_LOC=$3
    3015         if [ _"$CACHE_LOC" != _"" ]; then
    3016             mkdir -p $CACHE_LOC
    3017         fi
    3018         kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath=""
    3019 ###
    3020 ### Attempt to locate kernel specific module path
    3021 ### if module path is found then use it other wise use uname -r to set it...
    3022 ###
    3023         if [ "$kernelpath" = "" ]; then
    3024             kernelpath=`TryToFindKernelPath`
    3025         fi
    3026         kernelname=`echo $kernelpath | cut -d'-' -f2-`
    3027         LogIt "kernelname = $kernelname"
    3028         LogIt "kernelpath = $kernelpath"
    3029         if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
    3030         then
    3031            LogIt "Module path for ${kernelpath} not found..."
    3032            LogIt "using running kernel\'s modules."
    3033            kernelname=`uname -r`
     3102        MINDI_CACHE=$3
     3103        if [ _"$MINDI_CACHE" != _"" ]; then
     3104            mkdir -p $MINDI_CACHE
     3105        fi
     3106
     3107        if [ ! -e "$MONDORESTORECFG" ]; then
     3108            Die "MONDORESTORECFG undefined. Use an uptodate mondoarchive version"
     3109        fi
     3110
     3111        if [ ! -e "$MONDO_CACHE" ]; then
     3112            Die "MONDO_CACHE undefined. Use an uptodate mondoarchive version"
    30343113        else
    3035            LogIt "Using modules for kernel: ${kernelname}"
    3036         fi
    3037         TAPEDEV=$5
    3038         TAPESIZE=$6
    3039         FILES_IN_FILELIST=$7
    3040         USE_LZO=$8
    3041         CDRECOVERY=$9
    3042         if [ "${10}" = "(null)" ] || [ "${10}" = "" ] ; then
     3114            #
     3115            # Get from mondo our additional configuration
     3116            #
     3117            echo "Using $MONDO_CACHE/mindi.conf as additional config file"
     3118            if [ -f $MONDO_CACHE/mindi.conf ]; then
     3119                . $MONDO_CACHE/mindi.conf
     3120                echo "-----------------------------" >> $LOGFILE
     3121                echo " Mondo configuration file    " >> $LOGFILE
     3122                echo "-----------------------------" >> $LOGFILE
     3123                cat $MONDO_CACHE/mindi.conf >> $LOGFILE
     3124                echo "-----------------------------" >> $LOGFILE
     3125            else
     3126                Die "No mindi.conf file created by mondo. Aborting"
     3127            fi
     3128        fi
     3129
     3130        echo "Here is your mondoresctore.cfg file:" >> $LOGFILE
     3131        echo "------------------------------------" >> $LOGFILE
     3132        cat $MONDORESTORECFG >> $LOGFILE
     3133        echo "-----------------------------------" >> $LOGFILE
     3134
     3135        CDRECOVERY=`grep use-cdrecovery $MONDORESTORECFG | cut -d' ' -f2`
     3136        NOT_BOOT=`grep non-bootable $MONDORESTORECFG | cut -d' ' -f2`
     3137        USE_LILO=`grep use-lilo $MONDORESTORECFG | cut -d' ' -f2`
     3138        EXCLUDE_DEVS=`grep excluded-devs $MONDORESTORECFG | cut -d' ' -f2`
     3139        NFS_DEV=`grep nfs-dev $MONDORESTORECFG | cut -d' ' -f2`
     3140        VALUE=`grep image-devs $MONDORESTORECFG | cut -d' ' -f2`
     3141        if [ "$VALUE" = "(null)" ] || [ "$VALUE" = "" ] ; then
    30433142            IMAGE_DEVS=""
    30443143        else
    3045             IMAGE_DEVS="`echo "${10}" | tr '|' ' '`"
    3046         fi
    3047         if [ "${11}" ] ; then
    3048             LILO_OPTIONS=""
    3049     #       LogIt "LILO will use conservative settings, to be compatible with older BIOSes."
    3050         fi
    3051         LAST_FILELIST_NUMBER=${12}
    3052         ESTIMATED_TOTAL_NOOF_SLICES=${13}
    3053         EXCLUDE_DEVS="${14}"
    3054         USE_COMP="${15}"
    3055         USE_LILO="${16}"
    3056         USE_STAR="${17}"
    3057         INTERNAL_TAPE_BLOCK_SIZE="${18}"
    3058         DIFFERENTIAL="${19}"
    3059         USE_GZIP="${20}"
    3060         NOT_BOOT="${21}"
    3061         [ "$USE_COMP" = "" ] && USE_COMP=yes
    3062         [ "$USE_GZIP" = "" ] && USE_GZIP=no
    3063         [ "$NOT_BOOT" = "" ] && NOT_BOOT=no
    3064         [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine."
    3065         [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time"
    3066         MONDO_ROOT=`echo $CACHE_LOC | sed 's/\(.*\)\/.*/\1/'`
     3144            IMAGE_DEVS="`echo "$VALUE" | tr '|' ' '`"
     3145        fi
     3146        [ "$CDRECOVERY" = "yes" ] && [ "$PROMPT_MAKE_TAPE_IMAGE" = "yes" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time"
     3147        MONDO_ROOT=`echo $MINDI_CACHE | sed 's/\(.*\)\/.*/\1/'`
    30673148        if [ _"$MONDO_ROOT" != _"" ]; then
    30683149            mkdir -p $MONDO_ROOT
     
    31083189KERN_DISK_MADE=""
    31093190
    3110 echo "DIFFERENTIAL = $DIFFERENTIAL" >> $LOGFILE
    3111 echo "INTERNAL TAPE BLOCK SIZE = $INTERNAL_TAPE_BLOCK_SIZE" >> $LOGFILE
    3112 echo "NOT_BOOT = '$NOT_BOOT'" >> $LOGFILE
    3113 if [ "$NOT_BOOT" != "" ] && [ "$NOT_BOOT" != "0" ] && [ "$NOT_BOOT" != "no" ] ; then
    3114     LogIt "Just creating mondo-restore.cfg and a small all.tar.gz for Mondo. Nothing else."
    3115     MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    3116     MakeMountlist $MINDI_TMP/mountlist.txt
     3191if [ "$NOT_BOOT" = "yes" ]; then
     3192    LogIt "Just creating a small all.tar.gz for Mondo. Nothing else."
    31173193    mkdir -p $MINDI_TMP/small-all/tmp
     3194    MakeMountlist $MINDI_TMP/small-all/tmp/mountlist.txt
     3195    cp -f $MINDI_TMP/{filelist.full.gz,biggielist.txt} $MONDO_CACHE/mondo-restore.cfg $MINDI_CACHE/small-all/tmp 2>/dev/null || Die "Cannot copy small all.tar.gz"
    31183196    cd $MINDI_TMP/small-all
    3119     cp -f $MINDI_TMP/{mountlist.txt,mondo-restore.cfg,filelist.full.gz,biggielist.txt} tmp 2>/dev/null || Die "Cannot copy small all.tar.gz"
    3120     tar -cv tmp | gzip -9 > $MINDI_TMP/all.tar.gz || Die "Cannot make small all.tar.gz"
    3121     sleep 2
     3197    tar -cv tmp | gzip -9 > $MINDI_CACHE/all.tar.gz || Die "Cannot make small all.tar.gz"
     3198    sync
    31223199    LogIt "Done. Exiting."
    31233200    MindiExit 0
    31243201fi
    31253202
    3126 if [ _"$USBDEV" != _"" ]; then
    3127     LogIt "Including the generation of a Bootable USB device on $USBDEV"
     3203if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then
     3204    LogIt "Including the generation of a Bootable USB device on $USBDEVICE"
    31283205fi
    31293206if [ "$kernelpath" = "" ] ; then
     
    31843261    YOUR_KERNEL_SUCKS="Your kernel sucks"
    31853262fi
    3186 echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$CACHE_LOC" >> $LOGFILE
     3263echo -e "Mindi's temp dir = $MINDI_TMP \nMindi's output dir=$MINDI_CACHE" >> $LOGFILE
    31873264[ "$(($RANDOM%64))" -eq "0" ] && LogIt "Dude, I've looked inside your computer and it's really dusty..."
    31883265
    31893266[ "$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."
    31903267
    3191 rm -f $CACHE_LOC/{*img,*gz,*iso}
    3192 
    3193 PrepareDataDiskImages $CACHE_LOC
     3268rm -f $MINDI_CACHE/{*img,*gz,*iso}
     3269
     3270PrepareDataDiskImages $MINDI_CACHE
    31943271noof_disks=$?
    31953272[ "$noof_disks" -eq "0" ] && Die "Too much stuff!"
     
    32173294if [ "$USE_LILO" = "yes" ] ; then
    32183295    if [ "$ARCH" = "ia64" ] ; then
    3219         PrepareBootDiskImage_LILO $CACHE_LOC $IA64_BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppy disk image."
    3220     else
    3221         if ! PrepareBootDiskImage_LILO $CACHE_LOC 1722 $kernelpath $ramdisk_size ; then
     3296        PrepareBootDiskImage_LILO $MINDI_CACHE $IA64_BOOT_SIZE $kernelpath $ramdisk_size || Die "Failed to create ia64 floppy disk image."
     3297    else
     3298        if ! PrepareBootDiskImage_LILO $MINDI_CACHE 1722 $kernelpath $ramdisk_size ; then
    32223299            LogIt "WARNING - failed to create 1.72MB boot image."
    32233300            LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk."
    32243301        fi
    3225         if ! PrepareBootDiskImage_LILO $CACHE_LOC 2880 $kernelpath $ramdisk_size ;  then
     3302        if ! PrepareBootDiskImage_LILO $MINDI_CACHE 2880 $kernelpath $ramdisk_size ;  then
    32263303            LogIt "WARNING - failed to create 2.88MB floppy disk image."
    32273304            LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk."
    3228             PrepareBootDiskImage_LILO $CACHE_LOC 5760 $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."
     3305            PrepareBootDiskImage_LILO $MINDI_CACHE 5760 $kernelpath $ramdisk_size || Die "Failed to create 2.88MB floppy disk image."
    32293306        fi
    32303307    fi
    32313308else
    3232     if ! PrepareBootDiskImage_SYSLINUX $CACHE_LOC 1722 $kernelpath $ramdisk_size ; then
     3309    if ! PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 1722 $kernelpath $ramdisk_size ; then
    32333310        LogIt "WARNING - failed to create 1.72MB boot image."
    32343311        LogIt "Please reduce your kernel's size if you want to make a 1.72MB floppy disk."
    3235         if ! PrepareBootDiskImage_SYSLINUX $CACHE_LOC 2880 $kernelpath $ramdisk_size ; then
     3312        if ! PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 2880 $kernelpath $ramdisk_size ; then
    32363313            LogIt "WARNING - failed to create 2.88MB floppy disk image."
    32373314            LogIt "Please reduce your kernel's size if you want to make a 2.88MB floppy disk."
    3238             PrepareBootDiskImage_SYSLINUX $CACHE_LOC 5760 $kernelpath $ramdisk_size || Die "Failed to create 5.76MB floppy disk image."
     3315            PrepareBootDiskImage_SYSLINUX $MINDI_CACHE 5760 $kernelpath $ramdisk_size || Die "Failed to create 5.76MB floppy disk image."
    32393316        fi
    32403317    fi
     
    32453322
    32463323if [ _"$MONDO_SHARE" = _"" ]; then
    3247     ListImagesForUser $CACHE_LOC
     3324    ListImagesForUser $MINDI_CACHE
    32483325    boot_dev=/dev/fd0u1722
    32493326    [ ! -e "$boot_dev" ] && mknod $boot_dev b 2 60
     
    32513328    [ ! -e "$boot_dev" ] && Die "Will you PLEASE tell your distribution maker to create the 1.72MB devices in /dev?"
    32523329    if [ "$PROMPT_WRITE_BOOT_FLOPPIES" = "yes" ]; then
    3253         OfferToCopyImagesToDisks $CACHE_LOC $boot_dev $FDDEVICE
    3254     fi
    3255     OfferToMakeBootableISO $CACHE_LOC
    3256     if [ _"$USBDEV" != _"" ] ; then
    3257         OfferToMakeBootableUSB $CACHE_LOC
     3330        OfferToCopyImagesToDisks $MINDI_CACHE $boot_dev $FDDEVICE
     3331    fi
     3332    OfferToMakeBootableISO $MINDI_CACHE
     3333    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then
     3334        OfferToMakeBootableUSB $MINDI_CACHE
    32583335    fi
    32593336    LogIt "Finished."
    3260 elif [ "$TAPEDEV" ] ; then
    3261     rm -f $CACHE_LOC/{*img,*gz,*iso}
    3262     OfferToMakeBootableISO $CACHE_LOC
    3263     if [ -e "$CACHE_LOC/all.tar.gz" ] ; then
    3264         cp -f $CACHE_LOC/all.tar.gz $MINDI_TMP/ 2>> $LOGFILE
     3337elif [ "$PROMPT_MAKE_TAPE_IMAGE" = "yes" ] ; then
     3338    rm -f $MINDI_CACHE/{*img,*gz,*iso}
     3339    OfferToMakeBootableISO $MINDI_CACHE
     3340    if [ -e "$MINDI_CACHE/all.tar.gz" ] ; then
     3341        cp -f $MINDI_CACHE/all.tar.gz $MINDI_TMP/ 2>> $LOGFILE
    32653342    else
    32663343        Die "Cannot find all.tar.gz, to be written to tape"
    32673344    fi
    3268 elif [ _"$USBDEV" != _"" ] ; then
    3269     OfferToMakeBootableUSB $CACHE_LOC
     3345elif [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then
     3346    OfferToMakeBootableUSB $MINDI_CACHE
    32703347else
    3271     OfferToMakeBootableISO $CACHE_LOC
     3348    OfferToMakeBootableISO $MINDI_CACHE
    32723349fi
    32733350# cleanup
Note: See TracChangeset for help on using the changeset viewer.