Changeset 1063 in MondoRescue for branches/stable/mindi


Ignore:
Timestamp:
Jan 20, 2007, 11:37:55 PM (17 years ago)
Author:
Bruno Cornec
Message:
  • USB device support for mindi (Tested and Working)
  • Begining of USB device support for mondo (maybe not even compiling)
  • FindDistroFailsafe build process support
  • makemount list doesn't issue weird messages anymore around LVM
Location:
branches/stable/mindi
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/analyze-my-lvm

    r963 r1063  
    33# $Id$
    44#
    5 
    6 #------------------------- ANALYZE-MY-LVM ----------------------- Hugo Rabson
    7 # 07/14
    8 # - no longer blank first 4k of /dev/mdX
    9 #
    10 # 06/14/2004
    11 # - fixed "n >= 2.00" bug (shell doesn't handle floating points properly)
    12 # - handle dm_mod as well as dm-mod
    13 #
    14 # 02/18/2004
    15 # - nice patch to fix ListAllVolumeGroups() --- J. Richard
    16 # - patch to support LVM2 by Takeru Komoriya
    17 #
    18 # 10/15/2003
    19 # - fixed '-L'-handling to allow for floating-point gigabyte values
    20 #
    21 # 01/15/2003
    22 # - patch (LVM) by Brian Borgeson
    23 #
    24 # 12/10/2002
    25 # - patch by Benjamin Mampaey
    26 #
    27 # 09/05/2002
    28 # - additional patch by Ralph Gruwe
    29 #
    30 # 08/30/2002
    31 # - modified by Ralph Gruwe
    32 #
    33 # 10/01/2001
    34 # - last modified by Hugo :)
    35 #------------------------------------------------------------------------------
    365
    376Die() {
     
    186155ListAllLogicalVolumes() {
    187156    if [ $lvmversion = 2 ]; then
    188         $LVMCMD lvscan | grep "'" | cut -d"'" -f2
    189     else
    190         lvscan | grep '"' | cut -d'"' -f2
     157        $LVMCMD lvscan 2> /dev/null | grep "'" | cut -d"'" -f2
     158    else
     159        lvscan 2> /dev/null | grep '"' | cut -d'"' -f2
    191160    fi
    192161}
  • branches/stable/mindi/distributions/conf/mindi.conf.dist

    r1061 r1063  
    4141#
    4242mindi_write_cd="no"
     43
     44#
     45# Write mindi USB (yes|no) ?
     46#
     47mindi_write_usb="no"
    4348
    4449#
  • branches/stable/mindi/distributions/debian/FindDistroFailsafe

    r1062 r1063  
    1 # /usr/lib/mindi/DebFindFailsafe
     1#!/bin/bash
    22#
    3 # DebFindFailsafe - Find correct FAILSAFE kernel to use on Debian systems.
     3# $Id$
     4#
     5# FindDistroFailsafe - Find correct FAILSAFE kernel to use on Debian systems.
     6# (c) A. Leidenfrost
    47#
    58# Approach:
  • branches/stable/mindi/install.sh

    r1060 r1063  
    100100
    101101cp -af rootfs aux-tools $locallib/mindi
     102if [ -e FindDistroFailsafe ]; then
     103    cp -af FindDistroFailsafe $locallib/mindi
     104fi
    102105chmod 755 $locallib/mindi/rootfs/sbin/*
    103106chmod 755 $locallib/mindi/aux-tools/sbin/*
  • branches/stable/mindi/mindi

    r1062 r1063  
    3838if [ ! -f $MINDI_CONFIG_DIST ]; then
    3939    echo "Unable to find $MINDI_CONFIG_DIST. Please reinstall mindi"
    40     MindiExit -1
     40    exit -1
    4141fi
    4242md5sum --status -c "$MINDI_CONF/mindi.conf.dist.md5"
    4343if [ $? -ne 0 ]; then
    4444    echo "$MINDI_CONF/mindi.conf.dist md5 checksum incorrect. Please reinstall mindi"
    45 MindiExit -1
     45    exit -1
    4646fi
    4747. $MINDI_CONFIG_DIST
     
    5858# Manages defaults coming from conf files
    5959#
     60INTERACTIVE="$mindi_interactive"
     61
     62if [ $INTERACTIVE == "yes" ]; then
     63    # do you want to be prompted to write
     64    # floppy images out to floppy disks?
     65    # if 'no', images will not be written to floppies
     66    PROMPT_WRITE_BOOT_FLOPPIES="yes"
     67
     68    # Ask if you want to make a CD Image to be written?
     69    # if this is set to 'no', then the image will be created automatically
     70    PROMPT_MAKE_CD_IMAGE="yes"
     71
     72    # Ask if you want to make a USB Image to be written?
     73    # if this is set to 'no', then the image will be created automatically
     74    PROMPT_MAKE_USB_IMAGE="yes"
     75
     76    # If set to "no", you will be prompted for whether or not
     77    # you want to use your own kernel, or the supplied default.
     78    # If "yes" mindi will automatically use your own kernel.
     79    USE_OWN_KERNEL="no"
     80fi
     81
    6082EXTRA_SPACE=$mindi_extra_space
    6183IA64_BOOT_SIZE=$mindi_ia64_boot_size
     
    6486WRITE_BOOT_FLOPPIES="$mindi_write_boot_floppy"
    6587PROMPT_MAKE_CD_IMAGE="$mindi_write_cd"
     88PROMPT_MAKE_USB_IMAGE="$mindi_write_usb"
    6689USE_OWN_KERNEL="$mindi_use_own_kernel"
    6790CACHE_LOC="$mindi_images_dir"
     
    7295MY_FSTAB="$mindi_etc_fstab"
    7396LOGFILE="$mindi_log_file"
    74 INTERACTIVE="$mindi_interactive"
    75 
    76 if [ $INTERACTIVE == "yes" ]; then
    77     # do you want to be prompted to write
    78     # floppy images out to floppy disks?
    79     # if 'no', images will not be written to floppies
    80     PROMPT_WRITE_BOOT_FLOPPIES="yes"
    81 
    82     # Ask if you want to make a CD Image to be written?
    83     # if this is set to 'no', then the image will be created automatically
    84     PROMPT_MAKE_CD_IMAGE="yes"
    85 
    86     # If set to "no", you will be prompted for whether or not
    87     # you want to use your own kernel, or the supplied default.
    88     # If "yes" mindi will automatically use your own kernel.
    89     USE_OWN_KERNEL="no"
    90 fi
    91 
    9297FLOPPY_MODS="$mindi_floppy_mods"
    9398TAPE_MODS="$mindi_tape_mods"
     
    756761        [ "$modres" -eq "3" ] && echo -en "\t|"
    757762    done
    758     if [ "$MONDO_SHARE" ] ; then
     763    if [ _"$MONDO_SHARE" != _"" ]; then
    759764        mkdir -p $bigdir/tmp
    760765        mkdir -p $bigdir/sbin
     
    15121517OfferToMakeBootableISO() {
    15131518    local i old_pwd
    1514     if [ "$PROMPT_MAKE_CD_IMAGE" = "yes" ] && [ ! "$MONDO_SHARE" ] ; then
     1519    if [ "$PROMPT_MAKE_CD_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
    15151520        echo -en "Shall I make a bootable CD image? (y/[n]) "
    15161521        read i
     
    15341539            cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k"
    15351540            cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP"
    1536             [ "$MONDO_SHARE" ] && cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1541            if [ _"$MONDO_SHARE" != _"" ]; then
     1542                cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1543            fi
    15371544        fi
    15381545    done
    15391546    MakeSyslinuxMessageFile $MINDI_TMP/iso/isolinux/message.txt
    1540     cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MINDI_TMP/iso/isolinux/vmlinuz). Did you run out of disk space?"
    1541     [ "$MONDO_SHARE" ] && cp $kernelpath $MONDO_ROOT/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
     1547    cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/isolinux/vmlinuz). Did you run out of disk space?"
    15421548    cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img 2>> $LOGFILE
    1543     [ "$MONDO_SHARE" ] && cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE
     1549    if [ _"$MONDO_SHARE" != _"" ]; then
     1550        cp $kernelpath $MONDO_ROOT/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
     1551        cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE
     1552    fi
    15441553    [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur"
    15451554    cd $MINDI_TMP/iso/isolinux
    15461555    cat $iso_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/iso > isolinux.cfg || Die "Cannot copy isolinux.cfg from mindi_home to tmp_root - did you run out of disk space?"
    15471556    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    1548         mv isolinux.cfg isolinux.cfg.old
    1549         sed s/interactive/iso/ isolinux.cfg.old > isolinux.cfg
     1557        perl -pi -e 's/interactive/iso/' isolinux.cfg
    15501558    fi
    15511559    if [ "$ARCH" != "ia64" ] ; then
     
    15551563    cd $MINDI_TMP/iso
    15561564    if [ "$ARCH" != "ia64" ] ; then
    1557         [ "$MONDO_SHARE" ] && cp -f $MINDI_TMP/iso/isolinux/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk. Did you run out of disk space?"
    1558     fi
    1559     [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun .    2>> $LOGFILE
    1560     if [ "$ARCH" != "ia64" ] ; then
     1565        if [ _"$MONDO_SHARE" != _"" ]; then
     1566            cp -f $MINDI_TMP/iso/isolinux/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk. Did you run out of disk space?"
     1567            cp -f $MONDO_SHARE/autorun .    2>> $LOGFILE
     1568        fi
    15611569        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
    15621570    else
     
    15771585
    15781586
     1587OfferToMakeBootableUSB() {
     1588    local i old_pwd
     1589    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
     1590        echo "Shall I make a bootable USB image ?"
     1591        echo -en "WARNING: This will erase all content on $USBDEV (y/[n]) "
     1592        read i
     1593        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
     1594    fi
     1595    rm -Rf $MINDI_TMP/usb
     1596    mkdir -p $MINDI_TMP/usb
     1597    USBPART="${USBDEV}1"
     1598
     1599    echo -en "Transforming $USBDEV in a Bootable device "
     1600    echo -en "."
     1601    echo "Checking $USBDEV" >> $LOGFILE
     1602    $FDISK -l $USBDEV 2>&1 >> $LOGFILE
     1603    if [ $? -ne 0 ]; then
     1604        echo "Unable to access $USBDEV" | tee -a $LOGFILE
     1605        echo "Make sure your USB device is pluged in" | tee -a $LOGFILE
     1606        MindiExit -1
     1607    fi
     1608    echo -en "."
     1609    echo "Erasing $USBDEV" >> $LOGFILE
     1610    $FDISK $USBDEV 2>&1 >> $LOGFILE << EOF
     1611d
     1612d
     1613d
     1614d
     1615n
     1616p
     16171
     1618
     1619
     1620t
     1621b
     1622a
     16231
     1624w
     1625EOF
     1626    if [ $? -ne 0 ]; then
     1627        echo "Unable to create a vfat Filesystem on $USBDEV" | tee -a $LOGFILE
     1628        echo "Make sure your USB device is pluged in" | tee -a $LOGFILE
     1629        $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1630        MindiExit -1
     1631    fi
     1632    echo -en "."
     1633    echo "Creating a vfat filesystem on $USBPART" >> $LOGFILE
     1634    mkfs -t vfat $USBPART 2>&1 >> $LOGFILE
     1635    if [ $? -ne 0 ]; then
     1636        echo "Unable to create a vfat filesystem on $USBPART" | tee -a $LOGFILE
     1637        echo "Make sure your USB device is pluged in and partitioned ($USBPART must exist on it)" | tee -a $LOGFILE
     1638        $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1639        MindiExit -1
     1640    fi
     1641    echo -en "."
     1642    echo "Mounting $USBPART on $MINDI_TMP/usb" >> $LOGFILE
     1643    mount $USBPART $MINDI_TMP/usb 2>> $LOGFILE
     1644    if [ $? -ne 0 ]; then
     1645        echo "Unable to mount $USBPART on $MINDI_TMP/usb" | tee -a $LOGFILE
     1646        echo "Make sure your USB device is pluged in, partitioned and formated ($USBPART must exist on it)" | tee -a $LOGFILE
     1647        $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1648        MindiExit -1
     1649    fi
     1650    echo -en "."
     1651    mkdir -p $MINDI_TMP/usb/{images,archives}
     1652    cp -f $1/*.img $1/*.gz $MINDI_TMP/usb/images 2>> $LOGFILE || LogIt "OfferToMakeBootableUSB: Cannot copy $i to $MINDI_TMP/iso/images"
     1653    echo -en "."
     1654    old_pwd=`pwd`
     1655    cd $MINDI_TMP/usb
     1656    echo "mindi_lib = $MINDI_LIB" >> $LOGFILE
     1657    for i in memdisk memtest.bin memtest.img ; do
     1658        j=$MINDI_LIB/$i
     1659        k=$MINDI_TMP/usb
     1660        if [ -e "$j" ] ; then
     1661            LogIt "Copying $j to $k"
     1662            cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k"
     1663            cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP"
     1664            if [ _"$MONDO_SHARE" != _"" ]; then
     1665                cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1666            fi
     1667        fi
     1668    done
     1669    echo -en "."
     1670    MakeSyslinuxMessageFile $MINDI_TMP/usb/message.txt
     1671    echo -en "."
     1672    cp $kernelpath $MINDI_TMP/usb/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/usb/syslinux/vmlinuz). Did you run out of disk space?"
     1673    echo -en "."
     1674    cp $MINDI_TMP/mindi.rdz $MINDI_TMP/usb/initrd.img 2>> $LOGFILE
     1675    echo -en "."
     1676    if [ _"$MONDO_SHARE" != _"" ]; then
     1677        cp $kernelpath $MONDO_ROOT/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
     1678        cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE
     1679    fi
     1680    echo -en "."
     1681    [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur"
     1682    cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $MINDI_TMP/usb > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root - did you run out of disk space?"
     1683    echo -en "."
     1684    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1685        perl -pi -e 's/interactive/iso/' syslinux.cfg
     1686    fi
     1687    cd $old_pwd
     1688    umount $MINDI_TMP/usb
     1689    echo -en "."
     1690    if [ "$ARCH" != "ia64" ] ; then
     1691        if [ _"$MONDO_SHARE" != _"" ]; then
     1692            cp -f $MINDI_TMP/usb/syslinux/{syslinux.cfg,initrd.img,vmlinuz,message.txt} $MONDO_ROOT 2> /dev/null || Die "Cannot copy core files to ramdisk for boot disk. Did you run out of disk space?"
     1693            cp -f $MONDO_SHARE/autorun .    2>> $LOGFILE
     1694        fi
     1695        syslinux $USBPART 2>> $MINDI_TMP/syslinux.log
     1696    else
     1697        echo "No USB boot support for ia64" | tee -a $LOGFILE
     1698        MindiExit -1
     1699    fi
     1700    echo -en "."
     1701    if [ "$?" -ne "0" ] ; then
     1702        echo "----------- syslinux's errors --------------" |tee -a $LOGFILE
     1703        cat $MINDI_TMP/syslinux.log |tee -a $LOGFILE
     1704        LogIt "Failed to create USB image."
     1705    else
     1706        echo -e "$DONE"
     1707        echo "Created bootable USB image on $USBDEV" >> $LOGFILE
     1708    fi
     1709    rm -f $MINDI_TMP/syslinux.log
     1710}
     1711
     1712
    15791713PluralOrNot() {
    15801714    [ "$1" -gt "1" ] && echo -en "s"
     
    15911725    fi
    15921726    if [ "$disksize" -gt "2880" ] ; then
    1593         if [ "$MONDO_SHARE" ] ; then
     1727        if [ _"$MONDO_SHARE" != _"" ]; then
    15941728            if [ "$CDRECOVERY" != "yes" ] ; then
    15951729                if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     
    16861820    if [ "$CDRECOVERY" = "yes" ] ; then
    16871821        echo -en "default=RESTORE\n"
    1688     elif [ "$disksize" -gt "2880" ] && [ "$MONDO_SHARE" ] ; then
     1822    elif [ "$disksize" -gt "2880" ] && [ _"$MONDO_SHARE" != _"" ]; then
    16891823        if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    16901824            echo -en "default=iso\n"
     
    17071841        options="RESTORE expert"
    17081842    elif [ "$disksize" -gt "2880" ] ; then
    1709         if [ "$MONDO_SHARE" ] ; then
     1843        if [ _"$MONDO_SHARE" != _"" ]; then
    17101844            if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    17111845                options="iso"
     
    19292063    cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $mountpoint > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root"
    19302064    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    1931         mv syslinux.cfg syslinux.cfg.orig
    1932         sed s/interactive/iso/ syslinux.cfg.orig > syslinux.cfg
     2065        perl -pi -e 's/interactive/iso/' syslinux.cfg
    19332066    fi
    19342067    cd $old_pwd
     
    20582191    FindAndAddUserKeyboardMappingFile
    20592192    mkdir -p $bigdir/tmp
    2060     if [ "$MONDO_SHARE" ] ; then
     2193    if [ _"$MONDO_SHARE" != _"" ]; then
    20612194        MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    20622195        cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null
     
    20962229        tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "WARNING - error occurred while unzipping x11-tools.tgz"
    20972230    fi
    2098     if [ -e "$MONDO_SHARE/restore-scripts" ] ; then
     2231    if [ -e "$MONDO_SHARE/restore-scripts" ]; then
    20992232        cp -Rdf $MONDO_SHARE/restore-scripts/* . 2>> $LOGFILE
    21002233        [ "$?" -ne "0" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts"
     
    21102243    mkdir -p $minidir_root/$noof_disks/tmp
    21112244    cp -f $MINDI_TMP/mountlist.txt $minidir_root/$noof_disks/tmp/mountlist.txt 2> /dev/null || Die "Cannot copy mountlist.txt from $MINDI_TMP to data disk"
    2112     [ "$MONDO_SHARE" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE
     2245    if [ _"$MONDO_SHARE" != _"" ]; then
     2246        cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE
     2247    fi
    21132248    [ $LVM != "false" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm || LVM="false"
    21142249    cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE
     
    25722707    dd if=/dev/zero of=$mountpoint/zero &> /dev/null
    25732708    rm -f $mountpoint/zero
    2574     if [ "$MONDO_SHARE" ] ; then
     2709    if [ _"$MONDO_SHARE" != _"" ]; then
    25752710        MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg
    25762711        cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP &> /dev/null
     
    26302765    cd $minidir_root/all
    26312766    size_of_all_tools=`du -sk . | cut -f1`
    2632     if [ "$MONDO_SHARE" ] ; then
     2767    if [ _"$MONDO_SHARE" != _"" ]; then
    26332768        for q in filelist.full.gz biggielist.txt ; do
    26342769            [ ! -e "$MINDI_TMP/$q" ] && Die "Cannot find $MINDI_TMP/$q"
     
    26532788
    26542789
    2655 if [ "$1" = "-printvar" ] ; then
     2790if [ "$1" = "--printvar" ] ; then
    26562791    shift
    26572792    if [ _"$1" != _"" ] ; then
    26582793        set | egrep "^$1" | cut -d= -f2
    26592794    fi
    2660     exit 0
     2795    MindiExit 0
    26612796fi
    26622797
     
    28052940        MakeMountlist $2
    28062941        MindiExit $?
     2942    elif [ "$1" = "--usb" ] ; then
     2943        shift
     2944        USBDEV=$1
     2945        if [ _"$USBDEV" = _"" ]; then
     2946            Die "No USB device specified"
     2947        fi
     2948        LogIt "Generating Bootable USB device on $USBDEV"
     2949        shift
    28072950    elif [ "$1" = "-V" ] || [ "$1" = "-v" ] || [ "$1" = "--version" ] || [ "$1" = "-version" ] ; then
    28082951        echo "Mindi v$MINDI_VERSION"
    28092952        MindiExit 0
    28102953    elif [ "$#" -ge "9" ] && [ "$1" = "--custom" ] ; then
    2811         [ ! "$MONDO_SHARE" ] && Die "--custom is reserved for mondoarchive calls"
     2954        if [ _"$MONDO_SHARE" = _"" ]; then
     2955            Die "--custom is reserved for mondoarchive calls"
     2956        fi
    28122957        MONDO_TMP=$2
    28132958        # Change MINDI_TMP for the one provided by mondo
     
    29033048
    29043049[ -e "$iso_cfg_file" ] || Die "Cannot find $iso_cfg_file"
    2905 if [ ! "$MONDO_SHARE" ] ; then
     3050if [ _"$MONDO_SHARE" = _"" ]; then
    29063051    LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION"
    29073052    LogIt "Latest Mindi is available from http://www.mondorescue.org"
    29083053    LogIt "BusyBox sources are available from http://www.busybox.net"
    2909     LogIt "------------------------------------------------------------------------------"
    29103054else
    29113055    echo "You are using Mindi-Linux v$MINDI_VERSION to make boot+data disks" >> /var/log/mondo-archive.log
     
    29433087
    29443088if [ "$kernelpath" = "" ] ; then
    2945     [ "$MONDO_SHARE" ] && Die "Please use -k <path> to specify kernel."
    2946     echo -en "Do you want to use your own kernel to build the boot disk ([y]/n) ?"
    2947     read ch
    2948     if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then
    2949         USE_OWN_KERNEL="yes"
     3089    if [ _"$MONDO_SHARE" != _"" ]; then
     3090        Die "Please use -k <path> to specify kernel."
     3091    fi
     3092    if [ $INTERACTIVE == "yes" ]; then
     3093        echo -en "Do you want to use your own kernel to build the boot disk ([y]/n) ?"
     3094        read ch
     3095        if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then
     3096            USE_OWN_KERNEL="yes"
     3097        fi
    29503098    fi
    29513099    if [ "$USE_OWN_KERNEL" = "yes" ]; then
     
    29603108    fi
    29613109fi
    2962 if [ ! "$MONDO_SHARE" ] && [ $INTERACTIVE = "yes" ]; then
     3110if [ _"$MONDO_SHARE" = _"" ] && [ $INTERACTIVE = "yes" ]; then
    29633111    echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot CD/floppies (y/[n]) ?"
    29643112    read ch
     
    30383186...Or type 'memtest' to test your PC's RAM thoroughly.\n"
    30393187
    3040 if [ ! "$MONDO_SHARE" ] ; then
     3188if [ _"$MONDO_SHARE" = _"" ]; then
    30413189    ListImagesForUser $CACHE_LOC
    30423190    boot_dev=/dev/fd0u1722
     
    30483196    fi
    30493197    OfferToMakeBootableISO $CACHE_LOC
     3198    if [ _"$USBDEV" != _"" ] ; then
     3199        OfferToMakeBootableUSB $CACHE_LOC
     3200    fi
    30503201    LogIt "Finished."
    30513202elif [ "$TAPEDEV" ] ; then
     
    30573208        Die "Cannot find all.tar.gz, to be written to tape"
    30583209    fi
     3210elif [ _"$USBDEV" != _"" ] ; then
     3211    OfferToMakeBootableUSB $CACHE_LOC
    30593212else
    30603213    OfferToMakeBootableISO $CACHE_LOC
Note: See TracChangeset for help on using the changeset viewer.