Changeset 1079


Ignore:
Timestamp:
Jan 28, 2007, 5:58:18 PM (11 years ago)
Author:
bruno
Message:

merge -r1045:1078 £SVN_M/branches/stable

Location:
trunk
Files:
6 deleted
54 edited
6 copied

Legend:

Unmodified
Added
Removed
  • trunk/mindi/analyze-my-lvm

    r979 r1079  
    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}
  • trunk/mindi/distributions/conf/deplist.d/lvm.conf

    r454 r1079  
    33# Tools for LVM support
    44#
     5LVMFILES:
    56/etc/lvm/lvm.conf
    67/sbin/fsadm
  • trunk/mindi/distributions/conf/mindi.conf.dist

    r929 r1079  
    1818
    1919#
    20 # deplist directory
     20# Maximum compressed size for disk image in KB.
    2121#
    22 mindi_deplist_dir="/etc/mindi/deplist.d"
     22mindi_max_compressed_size=1300
     23
     24#
     25# deplist file name (stored in $MINDI_CONF)
     26#
     27mindi_deplist_file="deplist.txt"
    2328
    2429#
     
    3843
    3944#
     45# Write mindi USB (yes|no) ?
     46#
     47mindi_write_usb="no"
     48
     49#
     50# If set to "no", you will be prompted for whether or not
     51# you want to use your own kernel, or the supplied default.
     52# If "yes" mindi will automatically use your own kernel.
     53#
     54mindi_use_own_kernel="yes"
     55
     56#
    4057# Images creation dir
     58# WARNING: This directory is erased before usage
    4159#
    4260mindi_images_dir="/var/cache/mindi"
     
    5472#
    5573# Additional Boot Parameters
     74# You may want to remove acpi=off if you're unable to reboot on mindi's CD
     75# You may want to add ramdisk_size=1024 if on Fedora Core 5/6
    5676#
    5777mindi_boot_params="acpi=off apm=off devfs=nomount exec-shield=0 noresume selinux=0 barrier=off"
    5878
    59 # TBC
    6079
    6180# Kernel to use (NATIVE|FAILSAFE|PATH TO THE KERNEL)
     
    6483#mindi_kernel="/boot/vmlinuz.special"
    6584
    66 # TBC
     85#
     86# Modules supported by mindi and required at boot time
     87#
     88mindi_scsi_mods="3w-xxxx 3w_xxxx 53c7,8xx a100u2w a320raid aacraid advansys aha152x aha1542 aha1740 aic79xx aic79xx_mod aic7xxx aic7xxx_mod aic7xxx_old AM53C974 atp870u BusLogic cciss cpqfc dmx3191d dpt_i2o dtc eata eata_dma eata_pio fdomain gdth g_NCR5380 i2o_block i2o_core ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid mptbase mptscsih mptsas mptspi mptfc mptscsi mptctl NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs"
     89mindi_ide_mods="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core edd paride ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x"
     90mindi_usb_mods="usb-storage usb-ohci usb-uhci usbcore usb_storage hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid"
     91mindi_pcmcia_mods="pcmcia_core ds yenta_socket"
     92mindi_cdrom_mods="cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate"
     93mindi_tape_mods="ht st osst ide-tape ide_tape"
     94mindi_floppy_mods="ide-floppy floppy"
     95mindi_net_mods="sunrpc nfs nfs_acl lockd loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 vmxnet vmnet"
     96mindi_extra_mods="vfat fat loop md-mod linear raid0 raid1 xor raid5 lvm-mod dm-mod dm-snapshot dm-zero dm-mirror jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache"
    6797
    68 #
    69 # Additinal modules to support
     98# Additional modules to support
    7099# (white space separated list of modules)
    71100#
    72 mindi_additional_modules=""
    73 
    74 # TBC
    75 
    76 #
    77 # Boot loader to use
    78 # (GRUB|ELILO|LILO|RAW|NATIVE)
    79 #
    80 mindi_boot_loader="NATIVE"
     101mindi_additional_mods=""
    81102
    82103#
  • trunk/mindi/distributions/freebsd/pkg-plist

    r1039 r1079  
    11etc/mindi/deplist.txt
     2etc/mindi/mindi.conf
     3etc/mindi/mindi.conf.dist
     4etc/mindi/mindi.conf.dist.md5
    25doc/ChangeLog
    36doc/INSTALL
     
    1316@dirrm lib/mindi
    1417@dirrm etc/mindi
     18@dirrm etc/mindi/mindi.d
  • trunk/mindi/distributions/rpm/mindi.spec

    r939 r1079  
    6060%config(noreplace) %{_sysconfdir}/mindi/mindi.conf
    6161%config(noreplace) %{_sysconfdir}/mindi/mindi.conf.dist
     62%config(noreplace) %{_sysconfdir}/mindi/mindi.conf.dist.md5
    6263%doc ChangeLog INSTALL COPYING README TODO README.ia64 README.pxe README.busybox svn.log
    6364%{_mandir}/man8/*
  • trunk/mindi/install.sh

    r939 r1079  
    7272echo "Copying files ..."
    7373install -m 644 isolinux.cfg msg-txt sys-disk.raw.gz isolinux-H.cfg syslinux.cfg syslinux-H.cfg dev.tgz $locallib/mindi
    74 install -m 644 deplist.txt $conf
     74install -m 644 distributions/conf/deplist.d/* $conf/deplist.d
     75install -m 444 distributions/conf/mindi.conf.dist $conf
     76#
     77# Compute mindi.conf.dist (cecked by mindi) to avoid changes here
     78# Modify the checksum file so that path is correct at execution time
     79#
     80md5sum $conf/mindi.conf.dist > $conf/mindi.conf.dist.md5
     81perl -pi -e "s~$conf~$subconf~" $conf/mindi.conf.dist.md5
     82#
     83# Example of mindi.conf
     84#
     85cat > $conf/mindi.conf << EOF
     86#
     87# Configuration file for mindi
     88#
     89# By default values are taken from $conf/mindi.conf.dist
     90# You can override them here
     91#
     92# e.g.
     93#
     94#mindi_tmp_dir="/var/tmp"
     95#
     96EOF
     97chmod 644 $conf/mindi.conf
    7598install -m 644 distributions/conf/deplist.d/* $conf/deplist.d
    7699install -m 444 distributions/conf/mindi.conf.dist $conf
     
    89112chmod 644 $conf/mindi.conf
    90113
     114#
     115# Example of deplist.txt
     116#
     117cat > $conf/deplist.txt << EOF
     118# mindi additional dependency list
     119#
     120# NB:
     121# You have to give an absolute path
     122# If you want to add something, just add it on its own line. K.I.S.S.
     123
     124EOF
     125chmod 644 $conf/deplist.txt
     126
    91127cp -af rootfs aux-tools $locallib/mindi
     128if [ -e FindDistroFailsafe ]; then
     129    cp -af FindDistroFailsafe $locallib/mindi
     130fi
    92131chmod 755 $locallib/mindi/rootfs/sbin/*
    93132chmod 755 $locallib/mindi/aux-tools/sbin/*
  • trunk/mindi/mindi

    r1043 r1079  
    3636
    3737MINDI_CONFIG_DIST="$MINDI_CONF/mindi.conf.dist"
    38 if [ ! -f $MINDI_CONFIG_CONF ]; then
    39     echo "Unable to find $MINDI_CONFIG_CONF. Please reinstall mindi"
    40     MindiExit -1
     38if [ ! -f $MINDI_CONFIG_DIST ]; then
     39    echo "Unable to find $MINDI_CONFIG_DIST. Please reinstall mindi"
     40    exit -1
     41fi
     42md5sum --status -c "$MINDI_CONF/mindi.conf.dist.md5"
     43if [ $? -ne 0 ]; then
     44    echo "$MINDI_CONF/mindi.conf.dist md5 checksum incorrect. Please reinstall mindi"
     45    exit -1
    4146fi
    4247. $MINDI_CONFIG_DIST
     
    5358# Manages defaults coming from conf files
    5459#
    55 EXTRA_SPACE=$mindi_extra_space
    56 IA64_BOOT_SIZE=$mindi_ia64_boot_size
    57 DEPLIST_DIR="$mindi_deplist_dir"
    58 # TBC
    59 WRITE_BOOT_FLOPPIES="$mindi_write_boot_floppy"
    60 # TBC
    61 WRITE_MINDI_CD="$mindi_write_cd"
    62 # TBC
    63 CACHE_LOC="$mindi_images_dir"
    64 FORCE_DUAL_FLOPPIES="$mindi_dual_floppies"
    65 TMP_ROOT="$mindi_tmp_dir"
    66 FDDEVICE="$mindi_fd_device"
    67 ADDITIONAL_BOOT_PARAMS="$mindi_boot_params"
    68 MY_FSTAB="$mindi_etc_fstab"
    69 LOGFILE="$mindi_log_file"
    7060INTERACTIVE="$mindi_interactive"
    7161
     
    8070    PROMPT_MAKE_CD_IMAGE="yes"
    8171
     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
    8276    # If set to "no", you will be prompted for whether or not
    8377    # you want to use your own kernel, or the supplied default.
    8478    # If "yes" mindi will automatically use your own kernel.
    8579    USE_OWN_KERNEL="no"
    86 else
    87     PROMPT_WRITE_BOOT_FLOPPIES="no"
    88     PROMPT_MAKE_CD_IMAGE="no"
    89     USE_OWN_KERNEL="yes"
    9080fi
    9181
    92 FLOPPY_MODS="ide-floppy floppy"
    93 TAPE_MODS="ht st osst ide-tape ide_tape"
    94 SCSI_MODS="3w-xxxx 53c7,8xx a100u2w a320raid aacraid advansys aha152x aha1542 aha1740 aic79xx aic79xx_mod aic7xxx aic7xxx_mod aic7xxx_old AM53C974 atp870u BusLogic cciss cpqfc dmx3191d dpt_i2o dtc eata eata_dma eata_pio fdomain gdth g_NCR5380 i2o_block i2o_core ide-scsi ieee1394 imm in2000 initio ips iscsi isp megaraid mptbase mptscsih NCR53c406a ncr53c8xx nsp32 pas16 pci2000 pci2220i pcmcia ppa psi240i qla1280 qla2200 qla2300 qlogicfas qlogicfc qlogicisp raw1394 scsi_debug scsi_mod sd_mod seagate sg sim710 sr_mod sym53c416 sym53c8xx sym53c8xx_2 t128 tmscsim u14-34f ultrastor wd7000 vmhgfs"
    95 IDE_MODS="ide ide-generic ide-detect ide-mod ide-disk ide-cd ide_cd ide-cs ide-core ide_core libata edd paride ata_piix libata via82cxxx generic nvidia ahci"
    96 PCMCIA_MODS="pcmcia_core ds yenta_socket"
    97 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd usbkbd usbhid"
    98 CDROM_MODS="$TAPE_MODS $FLOPPY_MODS $IDE_MODS af_packet cdrom isocd isofs inflate_fs nls_iso8859-1 nls_cp437 sg sr_mod zlib_inflate $USB_MODS $PCMCIA_MODS"
    99 NET_MODS="sunrpc nfs nfs_acl lockd loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 vmxnet vmnet"
    100 NET_MODS="sunrpc nfs nfs_acl lockd loop mii 3c59x e100 bcm5700 bnx2 e1000 eepro100 ne2k-pci tg3 pcnet32 8139cp 8139too 8390 vmxnet vmnet"
    101 EXTRA_MODS="$CDROM_MODS vfat fat loop md-mod linear raid0 raid1 xor raid5 lvm-mod dm-mod dm-snapshot dm-zero dm-mirror jfs xfs xfs_support pagebuf reiserfs ext2 ext3 minix nfs nfs_acl nfsd lockd sunrpc jbd mbcache"
     82EXTRA_SPACE=$mindi_extra_space
     83IA64_BOOT_SIZE=$mindi_ia64_boot_size
     84DEPLIST_DIR="$MINDI_CONF/deplist.d"
     85DEPLIST_FILE="$MINDI_CONF/$mindi_deplist_file"
     86WRITE_BOOT_FLOPPIES="$mindi_write_boot_floppy"
     87PROMPT_MAKE_CD_IMAGE="$mindi_write_cd"
     88PROMPT_MAKE_USB_IMAGE="$mindi_write_usb"
     89USE_OWN_KERNEL="$mindi_use_own_kernel"
     90CACHE_LOC="$mindi_images_dir"
     91FORCE_DUAL_FLOPPIES="$mindi_dual_floppies"
     92TMPDIR="$mindi_tmp_dir"
     93FDDEVICE="$mindi_fd_device"
     94ADDITIONAL_BOOT_PARAMS="$mindi_boot_params"
     95MY_FSTAB="$mindi_etc_fstab"
     96LOGFILE="$mindi_log_file"
     97FLOPPY_MODS="$mindi_floppy_mods"
     98TAPE_MODS="$mindi_tape_mods"
     99SCSI_MODS="$mindi_scsi_mods"
     100IDE_MODS="$mindi_ide_mods"
     101PCMCIA_MODS="$mindi_pcmcia_mods"
     102USB_MODS="$mindi_usb_mods"
     103CDROM_MODS="$TAPE_MODS $FLOPPY_MODS $IDE_MODS $mindi_cdrom_mods $USB_MODS $PCMCIA_MODS"
     104NET_MODS="$mindi_net_mods"
     105EXTRA_MODS="$CDROM_MODS $mindi_extra_mods $mindi_additional_mods"
    102106
    103107BOOT_MEDIA_MESSAGE="$mindi_boot_msg"
    104108FDISK=$MINDI_SBIN/parted2fdisk
    105 
    106 # Using a config file allow to overwrite some values
    107 MINDI_CONFIG="$MINDI_CONF/mindi.conf"
    108 if [ -f $MINDI_CONFIG ]; then
    109     . $MINDI_CONFIG
    110 fi
    111109
    112110# Now we can create what we nedd
     
    215213    echo "Added kbd map $mappath" >> $LOGFILE
    216214    if [ ! -e "$mappath" ] ; then
    217         mappath=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"`
     215            mappath=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"`
    218216        if [ ! -e "$mappath" ] ; then
    219217            LogIt "Cannot add $mappath: kbd map file not found"
     
    233231    for included_item in $included_list ; do
    234232        if [ ! -e "$included_item" ] ; then
    235             sss=`find $KEYDIR/keymaps | grep -F "${included_item}.inc"`
    236             [ "$sss" = "" ] && sss=`find $KEYDIR/keymaps | grep -F "$included_item"`
     233                sss=`grep -F "${included_item}.inc" $MINDI_TMP/keymaps.find`
     234            [ "$sss" = "" ] && sss=`grep -F "$included_item" $MINDI_TMP/keymaps.find`
    237235            for ii in $sss ; do
    238236                [ -e "$ii" ] && AddKeyboardMappingFile $ii
     
    252250    biggienumber=$4
    253251
    254     [ -d "$filename" ] && Die "Cannot chop up $filename: it's a directory. Please amend deplist file accordingly."
     252    [ -d "$filename" ] && Die "Cannot chop up $filename: it's a directory. Please amend $DEPLIST_FILE accordingly."
    255253    mkdir -p $outdir
    256254
     
    411409    mkdir -p $mountpoint
    412410    dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)"
     411    echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE
    413412    mke2fs -N 12 -F $imagefile >> $LOGFILE 2>> $LOGFILE
    414413    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."
     
    416415    if [ "$?" -ne "0" ] ; then
    417416        umount $mountpoint
    418         Die "Tarball $tarball is too big for disk! (CODI)\nTell Dev Team to adjust MAX_COMPRESSED_SIZE"
     417        Die "Tarball $tarball is too big for disk! (CODI)\nAdjust mindi_max_compressed_size in your $MINDI_CONFIG"
    419418    fi
    420419    [ "$diskno" -eq "$noof_disks" ] && echo "This is the last disk ($diskno=$noof_disks)" >> $mountpoint/LAST-DISK
    421420    umount $mountpoint || LogIt "Cannot umount (CODI)"
    422421    rmdir $mountpoint || LogIt "Cannot rmdir (CODI)"
    423 }
    424 
    425 
    426 DidMondoCallMe() {
    427     local res
    428 
    429     res=0
    430     [ "`ps ax | grep -F "mondoarchive" | grep -v "grep"`" ] && res=$(($res+1))
    431     [ -f "/var/run/monitas-mondo.pid" ] && res=$(($res+1))
    432     [ "$res" -gt "1" ] && echo "yes"
    433422}
    434423
     
    463452
    464453    # Creates a tar file containing all required files
    465     for i in /etc/fstab /etc/lilo.conf /etc/raidtab $LOGFILE /var/log/mondo-archive.log ; do
     454    for i in $MY_FSTAB /etc/lilo.conf /etc/raidtab $LOGFILE /var/log/mondo-archive.log ; do
    466455        [ -e "$i" ] && cp -f $i $MINDI_TMP 2>> $LOGFILE
    467456    done
     
    557546    [ ! "$locale" ] && locale=`grep '.map$' "$keyfile" | sed 's/^.* //'`        # Slackware
    558547    echo "locale=$locale" >> $LOGFILE
    559     mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep -F "/${locale}." | grep -vx " *#.*"`
    560     [ ! "$mp" ] && mp=`find $KEYDIR/keymaps | grep "i[3-8]86" | grep "$locale[^r][^/]" | grep -vx " *#.*"`
     548    #
     549    # Process the keymaps dir once for all
     550    # AddKeyboardMappingFile will use it recursively
     551    #
     552    find $KEYDIR/keymaps > $MINDI_TMP/keymaps.find
     553    mp=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep -F "/${locale}." | grep -vx " *#.*"`
     554    [ ! "$mp" ] && mp=`grep "i[3-8]86" $MINDI_TMP/keymaps.find | grep "$locale[^r][^/]" | grep -vx " *#.*"`
    561555    # If we have multiple keymaps then log it !!
    562556    echo "$mp" | grep -q " "
     
    773767        [ "$modres" -eq "3" ] && echo -en "\t|"
    774768    done
    775     if [ "`DidMondoCallMe`" ] ; then
     769    if [ _"$MONDO_SHARE" != _"" ]; then
    776770        mkdir -p $bigdir/tmp
    777771        mkdir -p $bigdir/sbin
     
    962956        echo "Problem with dead link on $file -> $link" >> $LOGFILE
    963957    fi
    964     if [ "`echo $link | cut -c1`" = "/" ]; then
    965         echo "$link `ReadAllLink $link`"
    966     else
    967         d=`dirname $file`
    968         echo "$link `ReadAllLink $d/$link`"
    969     fi 
     958    if [ -h "$d" ]; then
     959        echo "$link $d"
     960    else
     961        echo "$link"
     962    fi
    970963}
    971964
     
    12521245                current_partition=$actual_dev
    12531246            else
    1254                 Die "Your system uses a LABEL partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstab or install findfs|blkid|vol_id"
     1247                Die "Your system uses a LABEL partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in $MY_FSTAB or install findfs|blkid|vol_id"
    12551248            fi
    12561249        # This part tries to retrieve the correct device from a UUID line in /etc/fstab
     
    13001293                current_partition=$actual_dev
    13011294            else
    1302                 Die "Your system uses a UUID partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in /etc/fstab or install findfs|blkid|vol_id"
     1295                Die "Your system uses a UUID partition ($current_partition), but you lack the tool to support it.\nPlease replace labels with their correct devices in $MY_FSTAB or install findfs|blkid|vol_id"
    13031296            fi
    13041297        else
     
    15301523OfferToMakeBootableISO() {
    15311524    local i old_pwd
    1532     if [ "$PROMPT_MAKE_CD_IMAGE" = "yes" ] && [ ! "`DidMondoCallMe`" ] ; then
     1525    if [ "$PROMPT_MAKE_CD_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
    15331526        echo -en "Shall I make a bootable CD image? (y/[n]) "
    15341527        read i
     
    15361529    fi
    15371530    if [ ! "$MINDI_TMP" ] ; then
    1538         LogIt "NB: Mindi's bootable CD always uses isolinux."
     1531        LogIt "NB: Mindi's bootable CD always uses isolinux or elilo."
    15391532        LogIt "For a bootable CD w/LILO, please use Mondo."
    15401533    fi
     
    15521545            cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k"
    15531546            cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP"
    1554             cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1547            if [ _"$MONDO_SHARE" != _"" ]; then
     1548                cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1549            fi
    15551550        fi
    15561551    done
    15571552    MakeSyslinuxMessageFile $MINDI_TMP/iso/isolinux/message.txt
    1558     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?"
    1559     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?"
     1553    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?"
    15601554    cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img 2>> $LOGFILE
    1561     cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE
     1555    if [ _"$MONDO_SHARE" != _"" ]; then
     1556        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?"
     1557        cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2> /dev/null || Die "Cannot copy mindi.rdz ($MINDI_TMP/mindi.rdz) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
     1558
     1559    fi
    15621560    [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur"
    15631561    cd $MINDI_TMP/iso/isolinux
    1564     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?"
     1562    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?"
    15651563    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    1566         mv isolinux.cfg isolinux.cfg.old
    1567         sed s/interactive/iso/ isolinux.cfg.old > isolinux.cfg
     1564        perl -pi -e 's/interactive/iso/' isolinux.cfg
    15681565    fi
    15691566    if [ "$ARCH" != "ia64" ] ; then
    1570         cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to tmp_root - did you run out of disk space?"
     1567        cp $ISOLINUX isolinux.bin 2> /dev/null || Die "Cannot copy isolinux.bin ($ISOLINUX) to $MINDI_TMP/iso/isolinux - did you run out of disk space?"
    15711568        cp $ISOLINUX ../ 2>> $LOGFILE
    15721569    fi
    15731570    cd $MINDI_TMP/iso
    15741571    if [ "$ARCH" != "ia64" ] ; then
    1575         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?"
    1576     fi
    1577     [ "$MONDO_SHARE" ] && cp -f $MONDO_SHARE/autorun .    2>> $LOGFILE
    1578     if [ "$ARCH" != "ia64" ] ; then
     1572        if [ _"$MONDO_SHARE" != _"" ]; then
     1573            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 (under $MONDO_ROOT). Did you run out of disk space?"
     1574            cp -f $MONDO_SHARE/autorun . 2>> $LOGFILE
     1575        fi
    15791576        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
    15801577    else
     
    15951592
    15961593
     1594OfferToMakeBootableUSB() {
     1595    local i old_pwd
     1596    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
     1597        echo "Shall I make a bootable USB image ?"
     1598        echo -en "WARNING: This will erase all content on $USBDEV (y/[n]) "
     1599        read i
     1600        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
     1601    fi
     1602    rm -Rf $MINDI_TMP/usb
     1603    mkdir -p $MINDI_TMP/usb
     1604    USBPART="${USBDEV}1"
     1605
     1606    echo -en "Transforming $USBDEV in a Bootable device "
     1607    echo -en "."
     1608    echo "Transforming $USBDEV in a Bootable device"  >> $LOGFILE
     1609    echo "Checking $USBDEV" >> $LOGFILE
     1610    $FDISK -l $USBDEV 2>&1 >> $LOGFILE
     1611    if [ $? -ne 0 ]; then
     1612        echo "Unable to access $USBDEV" | tee -a $LOGFILE
     1613        echo "Make sure your USB device is pluged in" | tee -a $LOGFILE
     1614        MindiExit -1
     1615    fi
     1616    echo -en "."
     1617    echo "Erasing $USBDEV" >> $LOGFILE
     1618    $FDISK $USBDEV 2>&1 >> $LOGFILE << EOF
     1619d
     1620d
     1621d
     1622d
     1623n
     1624p
     16251
     1626
     1627
     1628t
     1629b
     1630a
     16311
     1632w
     1633EOF
     1634    if [ $? -ne 0 ]; then
     1635        echo "Unable to create a vfat Filesystem on $USBDEV" | tee -a $LOGFILE
     1636        echo "Make sure your USB device is pluged in" | tee -a $LOGFILE
     1637        $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1638        MindiExit -1
     1639    fi
     1640    echo -en "."
     1641    echo "Creating a vfat filesystem on $USBPART" >> $LOGFILE
     1642    mkfs -t vfat $USBPART 2>&1 >> $LOGFILE
     1643    if [ $? -ne 0 ]; then
     1644        echo "Unable to create a vfat filesystem on $USBPART" | tee -a $LOGFILE
     1645        echo "Make sure your USB device is pluged in and partitioned ($USBPART must exist on it)" | tee -a $LOGFILE
     1646        $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1647        MindiExit -1
     1648    fi
     1649    echo -en "."
     1650    echo "Mounting $USBPART on $MINDI_TMP/usb" >> $LOGFILE
     1651    mount $USBPART $MINDI_TMP/usb 2>> $LOGFILE
     1652    if [ $? -ne 0 ]; then
     1653        echo "Unable to mount $USBPART on $MINDI_TMP/usb" | tee -a $LOGFILE
     1654        echo "Make sure your USB device is pluged in, partitioned and formated ($USBPART must exist on it)" | tee -a $LOGFILE
     1655        $FDISK -l $USBDEV 2>&1 | tee -a $LOGFILE
     1656        MindiExit -1
     1657    fi
     1658    echo -en "."
     1659    mkdir -p $MINDI_TMP/usb/{images,archives}
     1660    cp -f $1/*.img $1/*.gz $MINDI_TMP/usb/images 2>> $LOGFILE || LogIt "OfferToMakeBootableUSB: Cannot copy $i to $MINDI_TMP/iso/images"
     1661    echo -en "."
     1662    old_pwd=`pwd`
     1663    cd $MINDI_TMP/usb
     1664    echo "mindi_lib = $MINDI_LIB" >> $LOGFILE
     1665    for i in memdisk memtest.bin memtest.img ; do
     1666        j=$MINDI_LIB/$i
     1667        k=$MINDI_TMP/usb
     1668        if [ -e "$j" ] ; then
     1669            LogIt "Copying $j to $k"
     1670            cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k"
     1671            cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP"
     1672            if [ _"$MONDO_SHARE" != _"" ]; then
     1673                cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
     1674            fi
     1675        fi
     1676    done
     1677    echo -en "."
     1678    MakeSyslinuxMessageFile $MINDI_TMP/usb/message.txt
     1679    echo -en "."
     1680    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?"
     1681    echo -en "."
     1682    cp $MINDI_TMP/mindi.rdz $MINDI_TMP/usb/initrd.img 2>> $LOGFILE
     1683    echo -en "."
     1684    if [ _"$MONDO_SHARE" != _"" ]; then
     1685        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?"
     1686        cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2> /dev/null || Die "Cannot copy mindi.rdz ($MINDI_TMP) to mondo root ($MONDO_ROOT/initrd.img). Did you run out of disk space?"
     1687
     1688    fi
     1689    echo -en "."
     1690    [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur"
     1691    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?"
     1692    echo -en "."
     1693    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     1694        perl -pi -e 's/interactive/iso/' syslinux.cfg
     1695    fi
     1696    cd $old_pwd
     1697    echo -en "."
     1698    if [ "$ARCH" != "ia64" ] ; then
     1699        if [ _"$MONDO_SHARE" != _"" ]; then
     1700            cp -f $MINDI_TMP/usb/{syslinux.cfg,initrd.img,vmlinuz,message.txt} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?"
     1701            cp -f $MONDO_SHARE/autorun $MONDO_ROOT 2>> $LOGFILE
     1702        fi
     1703        umount $MINDI_TMP/usb
     1704        syslinux $USBPART 2>> $MINDI_TMP/syslinux.log
     1705    else
     1706        echo "No USB boot support for ia64" | tee -a $LOGFILE
     1707        umount $MINDI_TMP/usb
     1708        MindiExit -1
     1709    fi
     1710    echo -en "."
     1711    if [ "$?" -ne "0" ] ; then
     1712        echo "----------- syslinux's errors --------------" |tee -a $LOGFILE
     1713        cat $MINDI_TMP/syslinux.log |tee -a $LOGFILE
     1714        LogIt "Failed to create USB image."
     1715    else
     1716        echo -e "$DONE"
     1717        echo "Created bootable USB image on $USBDEV" >> $LOGFILE
     1718    fi
     1719    rm -f $MINDI_TMP/syslinux.log
     1720}
     1721
     1722
    15971723PluralOrNot() {
    15981724    [ "$1" -gt "1" ] && echo -en "s"
     
    16091735    fi
    16101736    if [ "$disksize" -gt "2880" ] ; then
    1611         if [ "`DidMondoCallMe`" ] ; then
     1737        if [ _"$MONDO_SHARE" != _"" ]; then
    16121738            if [ "$CDRECOVERY" != "yes" ] ; then
    16131739                if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
     
    16421768    mtpt=$MINDI_TMP/$rand1.$rand2.mtpt
    16431769    dd if=/dev/zero of=$image bs=1k count=$disksize &> /dev/null
     1770    echo "Creating ext2 filesystem on $image" >> $LOGFILE
    16441771    mke2fs -N 26 -F $image &> /dev/null
    16451772    mkdir -p $mtpt
     
    17041831    if [ "$CDRECOVERY" = "yes" ] ; then
    17051832        echo -en "default=RESTORE\n"
    1706     elif [ "$disksize" -gt "2880" ] && [ "`DidMondoCallMe`" ] ; then
     1833    elif [ "$disksize" -gt "2880" ] && [ _"$MONDO_SHARE" != _"" ]; then
    17071834        if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    17081835            echo -en "default=iso\n"
     
    17251852        options="RESTORE expert"
    17261853    elif [ "$disksize" -gt "2880" ] ; then
    1727         if [ "`DidMondoCallMe`" ] ; then
     1854        if [ _"$MONDO_SHARE" != _"" ]; then
    17281855            if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    17291856                options="iso"
     
    17461873            rootpart=""
    17471874        fi
    1748         outstr="image=vmlinuz\n\tlabel=$i\n\tinitrd=/mindi.rdz\n\t${rootpart}append=\" rw ramdisk=$ramdisksize ramdisk_size=$ramdisksize maxcpus=1 $ooo_mode $ADDITIONAL_BOOT_PARAMS"
     1875        outstr="image=/vmlinuz\n\tlabel=$i\n\tinitrd=/mindi.rdz\n\t${rootpart}append=\" rw ramdisk=$ramdisksize ramdisk_size=$ramdisksize maxcpus=1 $ooo_mode $ADDITIONAL_BOOT_PARAMS"
    17491876   
    17501877        outstr=$outstr" $ooo_mode"
     
    17821909        t=vfat
    17831910    else
     1911        echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE
    17841912        mke2fs -N 26 -m 0 -F $imagefile >> $LOGFILE 2>> $LOGFILE
    17851913        t=ext2
     
    18041932
    18051933    MakeLiloConfFile $disksize > $liloconf
     1934
     1935    # Copy it so that CD-ROM menu entry is satisfied
     1936    if [ "$ARCH" = "ia64" ] ; then
     1937        mountefi=0
     1938        df -T | grep /boot/efi | grep -q vfat
     1939        if [ $? -ne 0 ]; then
     1940            mount /boot/efi
     1941            if [ $? -ne 0 ]; then
     1942                echo "You have to mount your EFI partition when using mindi"
     1943                MindiExit -1
     1944            fi
     1945            mountefi=1
     1946        fi
     1947        cp /boot/efi/elilo.efi $mountpoint
     1948        cp $liloconf $mountpoint/elilo.efi $mountpoint/efi/boot
     1949        if [ $mountefi -eq 1 ]; then
     1950            umount /boot/efi 2>&1 > /dev/null
     1951        fi
     1952    fi
    18061953
    18071954    echo "Copying $MINDI_TMP/mindi.rdz to $mountpoint..." >> $LOGFILE
     
    19352082    else
    19362083        dd if=/dev/zero of=$imagefile bs=1k count=$disksize &> /dev/null || Die "Cannot dd blank file"
     2084        echo "Creating vfat filesystem on $imagefile" >> $LOGFILE
    19372085        mkfs.vfat $imagefile >> $LOGFILE 2>> $LOGFILE
    19382086        syslinux $imagefile >> $LOGFILE 2>> $LOGFILE
     
    19472095    cat $sys_cfg_file | HackSyslinuxFile $ramdisk_size $mountpoint > syslinux.cfg || Die "Cannot copy syslinux.cfg from mindi_home to tmp_root"
    19482096    if [ -e "$MINDI_TMP/NFS-DEV" ] ; then
    1949         mv syslinux.cfg syslinux.cfg.orig
    1950         sed s/interactive/iso/ syslinux.cfg.orig > syslinux.cfg
     2097        perl -pi -e 's/interactive/iso/' syslinux.cfg
    19512098    fi
    19522099    cd $old_pwd
     
    20232170
    20242171PrepareDataDiskImages() {
    2025     local needlist bigdir minidir_root tardir diskdir imagesdir res i j k old_pwd lines
     2172    local needlist bigdir minidir_root tardir diskdir imagesdir res i j k old_pwd lines lfiles
    20262173
    20272174    imagesdir=$1
     
    20342181    tardir=$MINDI_TMP/tardir
    20352182
    2036     lines=`grep -vx " *#.*" $MINDI_CONF/deplist.txt | grep -vx "" | wc -l`
    2037     cat $MINDI_CONF/deplist.txt | GenerateGiantDependencyList $needlist $lines
     2183    if [ -e "$DEPLIST_FILE" ]; then
     2184        lfiles="$DEPLIST_FILE $DEPLIST_DIR/*"
     2185    else
     2186        lfiles="$DEPLIST_DIR/*"
     2187    fi
     2188    lines=`grep -vx " *#.*" $lfiles | grep -vx "" | wc -l`
     2189    cat $lfiles | GenerateGiantDependencyList $needlist $lines
    20382190    res=$?
    20392191    if [ "$YOUR_KERNEL_SUCKS" ]; then
     
    20712223    FindAndAddUserKeyboardMappingFile
    20722224    mkdir -p $bigdir/tmp
    2073     if [ "`DidMondoCallMe`" ] ; then
     2225    if [ _"$MONDO_SHARE" != _"" ]; then
    20742226        MakeMondoConfigFile $MINDI_TMP/mondo-restore.cfg
    20752227        cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null
     
    21092261        tar -zxf $MINDI_LIB/x11-tools.tgz 2>> $LOGFILE || LogIt "WARNING - error occurred while unzipping x11-tools.tgz"
    21102262    fi
    2111     if [ -e "$MONDO_SHARE/restore-scripts" ] ; then
     2263    if [ -e "$MONDO_SHARE/restore-scripts" ]; then
    21122264        cp -Rdf $MONDO_SHARE/restore-scripts/* . 2>> $LOGFILE
    2113         [ "$?" -ne "0" ] && [ "`DidMondoCallMe`" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts"
     2265        [ "$?" -ne "0" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts"
    21142266    fi
    21152267    [ -d "/lib/dev-state" ] && cp --parents -pRdf /lib/dev-state . 2>> $LOGFILE
     
    21202272    noof_disks=$?
    21212273    [ "$noof_disks" -eq "0" ] && Die "Too much stuff!"
    2122 #    if [ "$noof_disks" -ge "8" ] ; then
    2123 #        LogIt "You are putting a ludicrously large amount of data on these disks."
    2124 #        LogIt "I shall therefore double EXTRA_SPACE, just in case your ramdisk is too small."
    2125 #        EXTRA_SPACE=$(($EXTRA_SPACE*2))
    2126 #    fi
    21272274    MakeMountlist $MINDI_TMP/mountlist.txt
    21282275    mkdir -p $minidir_root/$noof_disks/tmp
    21292276    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"
    2130     [ "`DidMondoCallMe`" ] && cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE
     2277    if [ _"$MONDO_SHARE" != _"" ]; then
     2278        cp -f $minidir_root/$noof_disks/tmp/mountlist.txt $MINDI_TMP/. 2>> $LOGFILE
     2279    fi
    21312280    [ $LVM != "false" ] && $MINDI_LIB/analyze-my-lvm > $minidir_root/$noof_disks/tmp/i-want-my-lvm || LVM="false"
    21322281    cat $minidir_root/$noof_disks/tmp/mountlist.txt >> $LOGFILE
     
    24982647    dd if=/dev/zero of=$tempfile bs=1k count=$ramdisk_size &> /dev/null || Die "Not enough room for temporary ramdisk (TurnTgzIntoRdz)"
    24992648    echo -en "..."
     2649    echo "Creating ext2 filesystem on $tempfile" >> $LOGFILE
    25002650    mke2fs -b 1024 -m 1 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE
    25012651    echo -en "..."
     
    25902740    dd if=/dev/zero of=$mountpoint/zero &> /dev/null
    25912741    rm -f $mountpoint/zero
    2592     if [ "`DidMondoCallMe`" ] ; then
     2742    if [ _"$MONDO_SHARE" != _"" ]; then
    25932743        MakeMondoConfigFile $mountpoint/tmp/mondo-restore.cfg
    25942744        cp -f $mountpoint/tmp/mondo-restore.cfg $MINDI_TMP &> /dev/null
     
    26482798    cd $minidir_root/all
    26492799    size_of_all_tools=`du -sk . | cut -f1`
    2650     if [ "`DidMondoCallMe`" ] ; then
     2800    if [ _"$MONDO_SHARE" != _"" ]; then
    26512801        for q in filelist.full.gz biggielist.txt ; do
    26522802            [ ! -e "$MINDI_TMP/$q" ] && Die "Cannot find $MINDI_TMP/$q"
     
    26712821
    26722822
    2673 if [ "$1" = "-printvar" ] ; then
     2823if [ "$1" = "--printvar" ] ; then
    26742824    shift
    26752825    if [ _"$1" != _"" ] ; then
    26762826        set | egrep "^$1" | cut -d= -f2
    26772827    fi
    2678     exit 0
     2828    MindiExit 0
    26792829fi
    26802830
     
    27402890fi
    27412891
    2742 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
     2892# If we have a distribution-specific script for finding a FAILSAFE kernel, use it.
     2893if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ] && [ "$kernelpath" = "FAILSAFE" ]; then
     2894    source $MINDI_LIB/FindDistroFailsafe
     2895    # Log kernel image
     2896    LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
     2897else
     2898    [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1`
     2899fi
    27432900
    27442901if ! which mkfs.vfat &> /dev/null ; then
     
    27582915    FindLiloBinary
    27592916fi
    2760 # BERLIOS: Remove as too dangerous and now useless
    2761 #grep -F " $MINDI_TMP " /proc/mounts | grep -F tmpfs > /dev/null 2> /dev/null && MINDI_TMP=/home/tmpmondo && mkdir -p $MINDI_TMP && LogIt "Changing MINDI_TMP to $MINDI_TMP because you're using tmpfs for /tmp\n" ; # tmpfs doesn't like Mindi and /tmp, for some reason
    27622917trap "Aborted" SIGTERM
    27632918DONE="\r\t\t\t\t\t\t\t\tDone.         "
    27642919CHOPSIZE=240
    27652920BIGNO=0
    2766 MAX_COMPRESSED_SIZE=1300
    2767 kernelpath=""
    2768 MONDO_ROOT=/var/cache/mondo
    2769 mkdir -p $MONDO_ROOT
     2921MAX_COMPRESSED_SIZE="$mindi_max_compressed_size"
     2922kernelpath="$mindi_kernel"
     2923if [ "$kernelpath" = "NATIVE" ]; then
     2924    kernelpath=""
     2925fi
     2926if [ "$ARCH" = "ia64" ] ; then
     2927    USE_LILO=yes
     2928else
     2929    USE_LILO=no
     2930fi
    27702931
    27712932if [ -d "/proc/lvm" ]; then
     
    27902951lsmod >> $LOGFILE
    27912952echo "-------------" >> $LOGFILE
    2792 
    2793 if [ "$#" -ge "2" ] ; then
    2794     if [ "$1" = "--max-compressed-size" ] ; then
    2795         MAX_COMPRESSED_SIZE=$2
    2796         shift; shift
    2797     fi
    2798 fi
     2953echo "Liste of extra modules is:" >> $LOGFILE
     2954echo "$EXTRA_MODS" >> $LOGFILE
     2955echo "-------------" >> $LOGFILE
     2956
    27992957
    28002958FLOPPY_WAS_MOUNTED=""
     
    28062964done
    28072965
     2966#
     2967# If we have a USB device we need to store info
     2968# and remove it from the parameters line
     2969#
     2970if [ "$#" -ne "0" ] ; then
     2971    if [ "$1" = "--usb" ] ; then
     2972        shift
     2973        USBDEV=$1
     2974        if [ _"$USBDEV" = _"" ]; then
     2975            Die "No USB device specified"
     2976        fi
     2977        shift
     2978    fi
     2979fi
     2980
     2981#
     2982# Deal with parameters
     2983#
    28082984if [ "$#" -ne "0" ] ; then
    28092985    if [ "$1" = "--findkernel" ] ; then
     
    28232999        MindiExit 0
    28243000    elif [ "$#" -ge "9" ] && [ "$1" = "--custom" ] ; then
     3001        if [ _"$MONDO_SHARE" = _"" ]; then
     3002            Die "--custom is reserved for mondoarchive calls"
     3003        fi
    28253004        MONDO_TMP=$2
    28263005        # Change MINDI_TMP for the one provided by mondo
     
    28373016        kernelpath=$4; [ "$kernelpath" = "(null)" ] && kernelpath=""
    28383017###
    2839 ### Sq-Modification...
    28403018### Attempt to locate kernel specific module path
    28413019### if module path is found then use it other wise use uname -r to set it...
    28423020###
     3021        if [ "$kernelpath" = "" ]; then
     3022            kernelpath=`TryToFindKernelPath`
     3023        fi
    28433024        kernelname=`echo $kernelpath | cut -d'-' -f2-`
    28443025        LogIt "kernelname = $kernelname"
     
    28523033           LogIt "Using modules for kernel: ${kernelname}"
    28533034        fi
    2854 ###
    2855 ### end of Sq-Modification
    2856 ###
    28573035        TAPEDEV=$5
    28583036        TAPESIZE=$6
     
    28833061        [ "$NOT_BOOT" = "" ] && NOT_BOOT=no
    28843062        [ "$TAPEDEV" ] && LogIt "This is a tape-based backup. Fine."
    2885         [ "$kernelpath" = "" ] && kernelpath=`TryToFindKernelPath`
    2886         kernelname=`echo $kernelpath | cut -d'-' -f2-`
    2887         if [ ! -d "/lib/modules/$kernelname" ] && [ "$kernelpath" != "FAILSAFE" ]
    2888         then
    2889            LogIt "Module path for ${kernelpath} not found..."
    2890            LogIt "using running kernel\'s modules."
    2891            kernelname=`uname -r`
    2892         else
    2893            LogIt "Using modules for kernel: ${kernelname}"
    2894         fi
    28953063        [ "$CDRECOVERY" = "yes" ] && [ "$TAPEDEV" != "" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time"
    28963064        MONDO_ROOT=`echo $CACHE_LOC | sed 's/\(.*\)\/.*/\1/'`
     
    29163084
    29173085[ -e "$iso_cfg_file" ] || Die "Cannot find $iso_cfg_file"
    2918 if [ ! "`DidMondoCallMe`" ] ; then
     3086if [ _"$MONDO_SHARE" = _"" ]; then
    29193087    LogIt "Mindi Linux mini-distro generator v$MINDI_VERSION"
    29203088    LogIt "Latest Mindi is available from http://www.mondorescue.org"
    29213089    LogIt "BusyBox sources are available from http://www.busybox.net"
    2922     LogIt "------------------------------------------------------------------------------"
    29233090else
    29243091    echo "You are using Mindi-Linux v$MINDI_VERSION to make boot+data disks" >> /var/log/mondo-archive.log
     
    29553122fi
    29563123
     3124if [ _"$USBDEV" != _"" ]; then
     3125    LogIt "Including the generation of a Bootable USB device on $USBDEV"
     3126fi
    29573127if [ "$kernelpath" = "" ] ; then
    2958     [ "`DidMondoCallMe`" ] && Die "Please use -k <path> to specify kernel."
    2959     echo -en "Do you want to use your own kernel to build the boot disk ([y]/n) ?"
    2960     read ch
    2961     if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then
    2962         USE_OWN_KERNEL="yes"
     3128    if [ _"$MONDO_SHARE" != _"" ]; then
     3129        Die "Please use -k <path> to specify kernel."
     3130    fi
     3131    if [ $INTERACTIVE == "yes" ]; then
     3132        echo -en "Do you want to use your own kernel to build the boot disk ([y]/n) ?"
     3133        read ch
     3134        if [ "$ch" != "n" ] && [ "$ch" != "N" ] ; then
     3135            USE_OWN_KERNEL="yes"
     3136        fi
    29633137    fi
    29643138    if [ "$USE_OWN_KERNEL" = "yes" ]; then
     
    29733147    fi
    29743148fi
    2975 if [ ! "`DidMondoCallMe`" ] ; then
     3149if [ _"$MONDO_SHARE" = _"" ] && [ $INTERACTIVE = "yes" ] && [ "$ARCH" != "ia64" ] ; then
    29763150    echo -en "Would you like to use LILO (instead of syslinux)\nfor your boot CD/floppies (y/[n]) ?"
    29773151    read ch
    2978     if [ "$ch" != "y" ] && [ "$ch" != "Y" ] ; then
    2979         USE_LILO=no
    2980     else
     3152    if [ "$ch" = "y" ] || [ "$ch" = "Y" ] ; then
    29813153        USE_LILO=yes
    29823154    fi
    29833155fi
    29843156if [ "$YOUR_KERNEL_SUCKS" != "" ] || [ "$kernelpath" = "" ] || [ "$kernelpath" = "SUCKS" ] || [ "$kernelpath" = "FAILSAFE" ] ; then
    2985     kernelpath=$MINDI_LIB/vmlinuz
    2986     LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
    2987     LogIt "However, you are still running your kernel. If Mindi fails to create your"
    2988     LogIt "disks then it may still be a result of a problem with your kernel."
    2989     pwd=`pwd`
    2990     cd $MINDI_TMP
    2991     bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2"
    2992     cd $pwd
     3157    # If we have a distribution-specific script for finding a FAILSAFE kernel, use it.
     3158    if [ -f "$MINDI_LIB/FindDistroFailsafe" ] && [ ! "$1" = "--makemountlist" ]; then
     3159        source $MINDI_LIB/FindDistroFailsafe
     3160        # Log kernel image
     3161        LogIt "FAILSAFE kernel image to be used is: $FAILSAFE_KBIN ($FAILSAFE_KVER)"
     3162        kernelpath="$FAILSAFE_KBIN"
     3163        LogIt "I shall include a failsafe kernel, not your kernel, in the boot disks.\n"
     3164        LogIt "The failsafe kernel is $kernelpath.\n"
     3165        LogIt "However, you are still running your kernel. If Mindi fails to create your\n"
     3166        LogIt "disks then it may still be a result of a problem with your kernel.\n"
     3167        pwd=`pwd`
     3168        cd $TMP_ROOT
     3169        mkdir -p lib/modules
     3170        cp -a "/lib/modules/$FAILSAFE_KVER" "lib/modules/$FAILSAFE_KVER" || Die "Cannot copy kernel modules."
     3171        cd $pwd
     3172    else
     3173        kernelpath=$MINDI_LIB/vmlinuz
     3174        LogIt "I shall include Mindi's failsafe kernel, not your kernel, in the boot disks."
     3175        LogIt "However, you are still running your kernel. If Mindi fails to create your"
     3176        LogIt "disks then it may still be a result of a problem with your kernel."
     3177        pwd=`pwd`
     3178        cd $MINDI_TMP
     3179        bzip2 -dc $MINDI_LIB/lib.tar.bz2 | tar -x || Die "Cannot unzip lib.tar.bz2"
     3180        cd $pwd
     3181    fi
    29933182    YOUR_KERNEL_SUCKS="Your kernel sucks"
    29943183fi
     
    30533242...Or type 'memtest' to test your PC's RAM thoroughly.\n"
    30543243
    3055 if [ ! "`DidMondoCallMe`" ] ; then
     3244if [ _"$MONDO_SHARE" = _"" ]; then
    30563245    ListImagesForUser $CACHE_LOC
    30573246    boot_dev=/dev/fd0u1722
     
    30633252    fi
    30643253    OfferToMakeBootableISO $CACHE_LOC
     3254    if [ _"$USBDEV" != _"" ] ; then
     3255        OfferToMakeBootableUSB $CACHE_LOC
     3256    fi
    30653257    LogIt "Finished."
    30663258elif [ "$TAPEDEV" ] ; then
     
    30723264        Die "Cannot find all.tar.gz, to be written to tape"
    30733265    fi
     3266elif [ _"$USBDEV" != _"" ] ; then
     3267    OfferToMakeBootableUSB $CACHE_LOC
    30743268else
    30753269    OfferToMakeBootableISO $CACHE_LOC
  • trunk/mindi/rootfs/etc/group

    r30 r1079  
    66tty::5:
    77disk::6:root,adm
    8 lp::7:lp
    98mem::8:
    109kmem::9:
    1110wheel::10:root
    1211floppy::11:root
    13 mail::12:mail
    14 news::13:news
    15 uucp::14:uucp
    16 man::15:man
    17 users::100:games
    1812nogroup::65534:
  • trunk/mindi/rootfs/etc/hosts

    r30 r1079  
    1 
    21127.0.0.1   localhost
    3 127.0.0.1   darkstar.frop.org darkstar
    4 212.216.176.33 mail.tin.it
  • trunk/mindi/rootfs/etc/ld.so.conf

    r863 r1079  
    22/usr/lib
    33/usr/local/lib
    4 /usr/ns/lib
    5 /usr/vnc/lib
    6 /usr/tcltk/lib
    74/usr/X11R6/lib
    8 /usr/srv/lib
    9 /usr/wks/lib
    10 /usr/gcc/lib
    11 /usr/perl/lib
    12 /usr/emu/lib
    13 /usr/jvm/lib
    145/lib64
    156/usr/lib64
  • trunk/mindi/rootfs/etc/passwd

    r30 r1079  
    1 halt:x:7:0:halt:/sbin:/sbin/halt
    2 operator:x:11:0:operator:/root:/bin/bash
    31root::0:0::/root:/bin/bash
    4 shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
    5 sync:x:5:0:sync:/sbin:/bin/sync
    62bin:x:1:1:bin:/bin:
    7 ftp:x:404:1::/home/ftp:/bin/bash
    83daemon:x:2:2:daemon:/sbin:
    94adm:x:3:4:adm:/var/adm:
    10 lp:x:4:7:lp:/var/spool/lpd:
    11 mail:x:8:12:mail:/var/spool/mail:
    12 postmaster:x:14:12:postmaster:/var/spool/mail:/bin/bash
    13 news:x:9:13:news:/usr/lib/news:
    14 uucp:x:10:14:uucp:/var/spool/uucppublic:
    15 man:x:13:15:man:/usr/man:
    16 guest:x:405:100:guest:/dev/null:/dev/null
    175nobody:x:65534:100:nobody:/dev/null:
    18 alfa::1001:0:alfa:/alfa:
  • trunk/mindi/rootfs/etc/shells

    r30 r1079  
    11/bin/sh
    2 
  • trunk/mindi/rootfs/etc/termcap

    r30 r1079  
    1111# Some entries in termcap 2.0.7 are too long and your programs
    1212# may complain "tgetent: warning: termcap entry too long". Here is
    13 a smaller termcap. But it may not cover as many terminals as the one
     13# a smaller termcap. But it may not cover as many terminals as the one
    1414# in termcap 2.0.7. You can install it as /etc/termcap.
    1515#
  • trunk/mindi/rootfs/sbin/init

    r1046 r1079  
    272272    if [ "`HowMuchFreeSpaceOnRamdisk`" -le "3" ] ; then
    273273        LogIt "Ramdisk is a bit smaller than I would like." 1
    274         LogIt "Please re-run Mondo/Mindi but edit /usr/local/mindi first" 1
     274        LogIt "Please re-run Mondo/Mindi but edit mindi first" 1
    275275        LogIt "and set EXTRA_SPACE to something high, e.g. 8000" 1
    276276        Die "Aborting. Please reboot."
     
    424424trap CaughtSoftReset SIGTERM
    425425LOGFILE=/tmp/mondo-restore.log
    426 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/mondo:/usr/local/mondo:/usr/local/mindi:.
     426PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/mondo:/usr/games
    427427GROOVY=/tmp/groovy-stuff
    428428USER=root
  • trunk/mondo-doc/mindi.8

    r979 r1079  
    3333.BI "mindi --makemountlist "file
    3434.br
    35 .BI "mindi [--max-compressed-size "max "] --custom " parameters
     35.BI "mindi --usb "device
     36.br
     37.BI "mindi --printvar "variable
    3638.SH DESCRIPTION
    3739.PP
     
    6466.SH OPTIONS
    6567.TP
    66 .BR "-v"| " --version"| " -V"| " -version"
    67 Prints the version of mindi.
    68 .TP
    69 .B --findkernel
    70 Finds the image of the running kernel in the file system.
     68.BI "-v"| " --version"| " -V"| " -version"
     69.RI Prints the version of mindi.
     70.TP
     71.BI "--findkernel"
     72.RI Finds the image of the running kernel in the file system.
    7173.TP
    7274.BI "--makemountlist "file
    7375.RI "Creates a mount list and writes it to file "file ".
    7476.TP
    75 .BI "--max-compressed-size "max
    76 Maximum size for disk image in KB.
     77.BI "--usb "device
     78.RI Create a bootable USB device
     79.TP
     80.BI "--printvar "variable
     81.RI "prints the value of the variable (useful for mondo-archive and debug)"
    7782.TP
    7883.BI "--custom " parameters
    79 Provide all required parameters to
    80 .B mindi
    81 for non-interactive calling. This usually means a call from
     84.RI "Provide all required parameters to"
     85.B mindi
     86.RI "for non-interactive calling. This usually means a call from"
    8287.BR "mondoarchive(8)".
    8388The following parameters are used:
     
    120125.br
    12112619) make non-bootable [yes|no]
     127.br
     12820) use gzip [yes|no]
    122129.br
    123130(Blank parameters must be specified as "" on the command line.)
     
    135142reports.
    136143.TP
     144.I /etc/mindi/deplist.d
     145Files containing the list of files to be included on boot/root disks.
     146.TP
    137147.I /etc/mindi/deplist.txt
    138 List of files to be included on boot/root disks.
     148List of additional files to be included on boot/root disks.
    139149.TP
    140150.I /var/cache/mindi/N.tar.gz
     
    168178called
    169179.B mindi.conf
    170 which overwrites default values by setting up the following variables:
    171 .TP
    172 .I TMPDIR
    173 .B (default /tmp): directory to create temporary files
    174 .br
    175 .TP
    176 .I EXTRA_SPACE
    177 .B (default 24576): increase if you run out of ramdisk space
    178 .br
    179 .TP
    180 .I IA64_BOOT_SIZE
    181 .B (default 8192): size of the ia64 boot disk
    182 .br
    183 .TP
    184 .I CACHE_LOC
    185 .B (default /var/cache/mindi): directory where boot/root files
    186 and iso are generated
    187 .br
    188 WARNING: This directory is erased before usage
     180which overwrites default values described in
     181.B mindi.conf.dist
     182in the same directory.
    189183.br
    190184.SH "SEE ALSO"
  • trunk/mondo-doc/mondoarchive.8

    r1043 r1079  
    135135.B For experienced users only.
    136136
     137.TP
     138.BI "-U "
     139Use a generic USB device as backup device. Use this if you want to write
     140your backup to a USB key or USB disk, which will be make bootable.
     141The USB device should be attached to the system ir order for this to work.
     142.B WARNING: All the data on the related devices will be removed.
     143
    137144.SH MAJOR OPTIONS
    138145.TP 13
     
    170177.TP
    171178.BI "-d " "dev|dir"
    172 Specify the backup device (CD/tape) or directory (NFS/ISO). For CD-R[W] drives,
     179Specify the backup device (CD/tape/USB) or directory (NFS/ISO). For CD-R[W] drives,
    173180this is the SCSI node where the drive may be found, e.g. '0,1,0'. For tape
    174 users, this is the tape streamers /dev entry, e.g. '/dev/st0'. For ISO users,
     181users, this is the tape streamers /dev entry, e.g. '/dev/st0'. For USB users,
     182this is the device name of your key or external disk. For ISO users,
    175183this is the directory where the ISO images are stored. For NFS users, this is
    176184the directory within the NFS mount where the backups are stored. The default
     
    240248.BI "-F "
    241249Do not offer to write boot+data floppy disk images to 3.5-inch floppy disks.
    242 The images will remain in /root/images/mindi until your next backup run,
     250The images will remain in /var/cache/mindi until your next backup run,
    243251however.
    244252
     
    412420.I "mondoarchive -Ow 4 -I \*(lq/home /etc\*(rq"
    413421
     422.BI USB:
     423Backup to your USB key, using gzip compression:
     424.br
     425.I "mondoarchive -OU -d /dev/sda -G"
     426
    414427.BI NFS:
    415428Backup to an NFS mount:
  • trunk/mondo/INSTALL

    r129 r1079  
    1313configure --with-maximum-noof-media=<big-number>. To make a statically
    1414linked mondorestore (not tested), configure --enable-static-mr.
    15 
    1615
    1716[original entry]
  • trunk/mondo/Makefile.am

    r824 r1079  
    22SUBDIRS        = src po
    33man8_MANS      = docs/man/mondoarchive.8 docs/man/mondorestore.8
    4 
    54ACLOCAL_AMFLAGS = -I m4
    6 
    7 EXTRA_DIST = config.rpath mkinstalldirs
    8 
    9 
  • trunk/mondo/bootstrap

    r507 r1079  
    11#!/bin/bash
     2#
     3# $Id$
    24#
    35# Built from scratch
  • trunk/mondo/configure.in

    r932 r1079  
    7474        AC_CHECK_LIB(pthread, pthread_create, true, [echo "*** Cannot find -lpthread."; echo "*** Please make sure you have the linuxthreads glibc add-on installed."; exit 1])
    7575        PTHREAD="-lpthread"
    76         CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT"
     76        CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -Wshadow -funsigned-char -Wstrict-prototypes -Wunused -Winit-self -Wcast-align"
    7777        ;;
    7878    *)
  • trunk/mondo/distributions/rpm/mondo.spec

    r1043 r1079  
    1616Source:     SSS
    1717BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
    18 BuildRequires:  newt-devel >= 0.50
     18BuildRequires:  newt-devel >= 0.50, gettext-devel
    1919ExcludeArch:    ppc
    2020OBS
    21 Requires:   mindi >= 1.2.1, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD
     21Requires:   mindi >= 1.2.1, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, gettext, DDD
    2222%ifarch ia64
    2323Requires:   elilo, parted
  • trunk/mondo/po/POTFILES.in

    r975 r1079  
    3939src/common/newt-specific.h
    4040src/common/libmondo-tools.h
    41 src/common/libmondo-string.c
    4241src/common/libmondo-fork.h
    4342src/common/libmondo-files.h
    4443src/common/libmondo-filelist.c
    45 src/common/libmondo-string.h
    4644src/common/libmondo-raid.c
    4745src/common/libmondo-filelist.h
     
    4947src/common/libmondo-raid.h
    5048src/common/mondostructures.h
    51 src/common/libmondo-msg.c
    5249src/common/libmondo-archive.h
    5350src/common/libmondo-stream.c
  • trunk/mondo/src/common/Makefile.am

    r839 r1079  
     1##
     2## $Id$
    13##
    24## Process this file with Automake to generate `Makefile.in'
  • trunk/mondo/src/common/libmondo-archive.c

    r1074 r1079  
    3232#include "libmondo-verify-EXT.h"
    3333#include "libmondo-archive.h"
     34
    3435#define DVDRWFORMAT 1
    3536
     
    544545    char *tmp = NULL;
    545546    char *tmp1 = NULL;
     547    char *tmp2 = NULL;
    546548    char *command = NULL;
    547549    char *use_lzo_sz = NULL;
     
    786788        mr_asprintf(&value, "dvd");
    787789        break;
     790    case usb:
     791        strcpy(value, "usb");
     792        break;
    788793    default:
    789794        fatal_error("Unknown backup_media_type");
     
    854859    log_msg(1, "lines_in_filelist = %ld", lines_in_filelist);
    855860
     861    if (bkpinfo->backup_media_type == usb) {
     862        asprintf(&tmp2, "--usb %s", bkpinfo->media_device);
     863    } else {
     864        asprintf(&tmp2,"");
     865    }
     866
    856867    // Watch it! This next line adds a parameter...
    857868    if (bkpinfo->nonbootable_backup) {
     
    862873
    863874    mr_asprintf(&command,
    864 /*     "mindi --custom 2=%s 3=%s/images 4=\"%s\" 5=\"%s\" \
    865 6=\"%s\" 7=%ld 8=\"%s\" 9=\"%s\" 10=\"%s\" \
    866 11=\"%s\" 12=%s 13=%ld 14=\"%s\" 15=\"%s\" 16=\"%s\" 17=\"%s\" 18=%ld 19=%d",*/
    867              "mindi --custom %s %s/images '%s' '%s' \
     875            "mindi %s --custom '%s' '%s/images' '%s' '%s' \
    868876'%s' %ld '%s' '%s' '%s' \
    869 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", bkpinfo->tmpdir,  // parameter #2
    870              bkpinfo->scratchdir,   // parameter #3
    871              bkpinfo->kernel_path,  // parameter #4
    872              tape_device,       // parameter #5
    873              tape_size_sz,      // parameter #6
    874              lines_in_filelist, // parameter #7 (INT)
    875              use_lzo_sz,        // parameter #8
    876              cd_recovery_sz,    // parameter #9
    877              bkpinfo->image_devs,   // parameter #10
    878              broken_bios_sz,    // parameter #11
    879              last_filelist_number,  // parameter #12 (STRING)
    880              estimated_total_noof_slices,   // parameter #13 (INT)
    881              devs_to_exclude,   // parameter #14
    882              use_comp_sz,       // parameter #15
    883              use_lilo_sz,       // parameter #16
    884              use_star_sz,       // parameter #17
    885              bkpinfo->internal_tape_block_size, // parameter #18 (LONG)
    886              bkpinfo->differential, // parameter #19 (INT)
    887              use_gzip_sz,       // parameter #20 (STRING)
    888              tmp);
     877'%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'",
     878            tmp2,
     879            bkpinfo->tmpdir,        // parameter #2
     880            bkpinfo->scratchdir,    // parameter #3
     881            bkpinfo->kernel_path,   // parameter #4
     882            tape_device,            // parameter #5
     883            tape_size_sz,           // parameter #6
     884            lines_in_filelist,      // parameter #7 (INT)
     885            use_lzo_sz,             // parameter #8
     886            cd_recovery_sz,         // parameter #9
     887            bkpinfo->image_devs,    // parameter #10
     888            broken_bios_sz,         // parameter #11
     889            last_filelist_number,   // parameter #12 (STRING)
     890            estimated_total_noof_slices,    // parameter #13 (INT)
     891            devs_to_exclude,        // parameter #14
     892            use_comp_sz,            // parameter #15
     893            use_lilo_sz,            // parameter #16
     894            use_star_sz,            // parameter #17
     895            bkpinfo->internal_tape_block_size,  // parameter #18 (LONG)
     896            bkpinfo->differential,  // parameter #19 (INT)
     897            use_gzip_sz,            // parameter #20 (STRING)
     898            tmp);
    889899    mr_free(tmp);
    890900    mr_free(tape_size_sz);
     
    899909    mr_free(use_lilo_sz);
    900910    mr_free(use_gzip_sz);
     911    mr_free(tmp2);
    901912
    902913    log_msg(2, command);
  • trunk/mondo/src/common/libmondo-devices.c

    r1000 r1079  
    1 /*
    2  * $Id$
    3  * Subroutines for handling devices
    4  */
     1/* libmondo-devices.c                 Subroutines for handling devices
     2   $Id$
     3*/
     4
    55/**
    66 * @file
     
    14691469    case cdrw:
    14701470    case dvd:
     1471    case usb:
    14711472        if (archiving_to_media) {
    1472             if (bkpinfo->backup_media_type != dvd) {
     1473            if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) {
    14731474                if (ask_me_yes_or_no
    14741475                    (_("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?")))
     
    14901491                mr_asprintf(&sz_size, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4582 MB
    14911492                log_msg(1, "Setting to DVD defaults");
     1493            } else if (bkpinfo->backup_media_type == usb) {
     1494                strcpy(bkpinfo->media_device, VANILLA_USB_DEVICE);
     1495                strcpy(sz_size, "512");
    14921496            } else {
    14931497                mr_allocstr(bkpinfo->media_device,VANILLA_SCSI_CDROM );
     
    14961500                log_msg(1, "Setting to CD defaults");
    14971501            }
    1498             if (bkpinfo->backup_media_type != dvd) {
     1502            if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) {
    14991503                if (!popup_and_get_string(_("Speed"), comment, tmp)) {
    15001504                    log_to_screen(_("User has chosen not to backup the PC"));
  • trunk/mondo/src/common/libmondo-fifo.c

    r956 r1079  
    11/* $Id$ */
    2 
    32/**
    43 * @file
  • trunk/mondo/src/common/libmondo-fork.c

    r900 r1079  
    22 * $Id$
    33 */
    4 
    54#include "my-stuff.h"
    65#include "mondostructures.h"
  • trunk/mondo/src/common/libmondo-raid.c

    r900 r1079  
    1717#include "libmondo-raid.h"
    1818#include "mr_mem.h"
     19#include "mr_str.h"
    1920
    2021#ifdef __FreeBSD__
  • trunk/mondo/src/common/libmondo-tools.c

    r1046 r1079  
    181181
    182182/**
    183  * Locate mondoarchive's home directory. Searches in /usr/local/mondo, /usr/share/mondo,
     183 * Locate mondoarchive's home directory. Searches in /usr/share/mondo,
    184184 * /usr/local/share/mondo, /opt, or if all else fails, search /usr.
    185185 *
  • trunk/mondo/src/common/libmondo-verify.c

    r1074 r1079  
    11/* $Id$ */
    2 
    32/**
    43 * @file
  • trunk/mondo/src/common/mondostructures.h

    r1043 r1079  
    167167    nfs,                        ///< Back up to an NFS mount on the local subnet.
    168168    tape,                       ///< Back up to tapes.
     169    usb,                        ///< Back up to USB devices.
    169170    udev                        ///< Back up to another unsupported device; just send a stream of bytes.
    170171} t_bkptype;
     
    312313   * The device we're backing up to.
    313314   * If backup_media_type is @b cdr, @b cdrw, or @b cdstream, this should be the SCSI node (e.g. 0,1,0).
    314    * If backup_media_type is @b dvd, @b tape, or @b udev, this should be a /dev entry.
     315   * If backup_media_type is @b dvd, @b tape, @b usb or @b udev, this should be a /dev entry.
    315316   * If backup_media_type is anything else, this should be blank.
    316317   */
  • trunk/mondo/src/include/mr_conf.h

    • Property svn:eol-style set to native
  • trunk/mondo/src/include/mr_str.h

    • Property svn:eol-style set to native
  • trunk/mondo/src/include/my-stuff.h

    • Property svn:eol-style set to native
    r1074 r1079  
    126126#define ARBITRARY_MAXIMUM 2000  ///< The maximum number of items showing at once in the mountlist or filelist editor.
    127127#define MAX_TAPECATALOG_ENTRIES 8192    ///< The maximum number of entries in the tape catalog.
    128 #define MAX_STR_LEN 380         ///< The maximum length of almost all @p char buffers in Mondo.
     128#define MAX_STR_LEN 384         ///< The maximum length of almost all @p char buffers in Mondo.
     129                                        ///  Note: Make this divisible by eight to avoid aligment issues
     130                                        ///        on 64bit platforms like ia64.
    129131#define MAXIMUM_RAID_DEVS 32    ///< The maximum number of RAID devices in the raidlist.
    130132#define MAXIMUM_ADDITIONAL_RAID_VARS 32 ///< The maximum number of additional RAID variables per RAID device in the raidlist.
  • trunk/mondo/src/lib/mr_conf.c

    • Property svn:eol-style set to native
  • trunk/mondo/src/lib/mr_str.c

    • Property svn:eol-style set to native
  • trunk/mondo/src/mondoarchive/Makefile.am

    r900 r1079  
     1## $Id$
     2##
    13## $Id$
    24##
  • trunk/mondo/src/mondoarchive/mondo-cli.c

    r1043 r1079  
    216216    i = flag_set['c'] + flag_set['i'] + flag_set['n'] +
    217217        flag_set['t'] + flag_set['u'] + flag_set['r'] +
    218         flag_set['w'] + flag_set['C'];
     218        flag_set['w'] + flag_set['C'] + flag_set['U'];
    219219    if (i == 0) {
    220220        retval++;
     
    404404    }
    405405
     406    if (flag_set['U'])          // USB
     407    {
     408        if (! flag_set['d']) {
     409            fatal_error
     410                ("You need to specify a device file with -d for bootable USB device creation");
     411        }
     412        if (!flag_set['s']) {
     413            fatal_error("You did not specify a size (-s) for your USB device. Aborting");
     414        }
     415    }
     416
    406417    if (flag_set['r'])          // DVD
    407418    {
     
    453464            }
    454465        }
    455     } else {                    /* CD size */
     466    } else {                    /* CD|USB size */
    456467        if (flag_set['s']) {
    457468            if (process_the_s_switch(bkpinfo, flag_val['s'])) {
     
    505516    if (flag_set['w']) {
    506517        bkpinfo->backup_media_type = cdrw;
     518    }
     519    if (flag_set['U']) {
     520        bkpinfo->backup_media_type = usb;
    507521    }
    508522    if (flag_set['z']) {
     
    641655    }
    642656
    643     if (flag_set['d']) {        /* backup directory (if ISO/NFS) */
     657    if (flag_set['d']) {        /* backup directory (if ISO/NFS/USB) */
    644658        if (flag_set['i']) {
    645659            mr_allocstr(bkpinfo->isodir,flag_val['d']);
     
    653667            mr_allocstr(bkpinfo->nfs_remote_dir,flag_val['d']);
    654668        } else {                /* backup device (if tape/CD-R/CD-RW) */
    655 
    656669            mr_allocstr(bkpinfo->media_device, flag_val['d']);
    657670        }
     
    673686
    674687    if (!flag_set['d']
    675         && (flag_set['c'] || flag_set['w'] || flag_set['C'])) {
     688        && (flag_set['c'] || flag_set['w'] || flag_set['C'] || flag_set['U'])) {
    676689        if (g_kernel_version >= 2.6) {
    677690            if (popup_and_get_string
     
    902915    while ((opt =
    903916            getopt(argc, argv,
    904                    "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T:VWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z"))
     917                   "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T:UVWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z"))
    905918           != -1) {
    906919        if (opt == '?') {
  • trunk/mondo/src/mondorestore/Makefile.am

    r900 r1079  
     1## $Id$
     2##
    13## $Id$
    24##
    35## Process with Automake to generate Makefile.in
    46##
     7AM_CPPFLAGS = -DMONDO_CONF_DIR=\"$(sysconfdir)\" -I${top_builddir}/src/include
    58
    69AM_CPPFLAGS = -DMONDO_CONF_DIR=\"$(sysconfdir)\" -I${top_builddir}/src/include
  • trunk/mondo/src/mondorestore/mondo-restore.c

    r1043 r1079  
    11/***************************************************************************
    2  * $Id$
    3  */
     2$Id$
     3restores mondoarchive data
     4***************************************************************************/
    45
    56/**
     
    21562157            mr_free(tarball_fname);
    21572158            mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%ld.afio.lzo",
     2159                current_tarball_number);
     2160        }
     2161        if (!does_file_exist(tarball_fname)) {
     2162            mr_free(tarball_fname);
     2163            mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%ld.afio.gz",
    21582164                    current_tarball_number);
    21592165        }
  • trunk/mondo/src/mondorestore/mondo-rstr-tools.h

    r914 r1079  
    99void kill_petris(void);
    1010int mount_cdrom(struct s_bkpinfo *bkpinfo);
     11int mount_device(char *, char *, char *, bool);
    1112int mount_all_devices(struct mountlist_itself *, bool);
    1213void protect_against_braindead_sysadmins(void);
  • trunk/mondo/src/test/mktest

    r900 r1079  
    66#
    77
    8 gcc -O2 -I../common -I../lib test-conf.c ../lib/mr_conf.c ../common/libmondo-msg.c -o test-conf
    9 gcc -O2 -I../common -I../lib test-string.c ../lib/mr_str.c -o test-string
     8lib="../lib/mr_conf.c ../lib/mr_msg.c ../lib/mr_err.c ../lib/mr_mem.c"
     9OPT="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -Wstrict-prototypes -Wshadow -funsigned-char -Wunused -Winit-self -Wcast-align -O2 -g -I../common -I../include"
    1010
    11 for f in "test-conf"; do
     11echo "Generating test-msg"
     12gcc $OPT test-msg.c $lib -o test-msg
     13echo "Generating test-string"
     14gcc $OPT test-string.c ../lib/mr_str.c $lib -o test-string
     15echo "Generating test-conf"
     16gcc $OPT test-conf.c $lib -o test-conf
     17
     18echo "Testing against previous run"
     19for f in test-conf test-string test-msg; do
    1220    chmod 755 $f
    1321    ./$f > /tmp/$f.res
     
    1624        echo "$f test KO !!"
    1725    fi
     26    valgrind -q --error-exitcode=1 --leak-check=yes ./$f 2>&1 > /tmp/valgrind-$f.res
     27    if [ $? -ne 0 ]; then
     28        echo "valgrind $f test KO !!"
     29    fi
    1830done
  • trunk/mondo/src/test/mondo.conf

    r531 r1079  
    55# Test conf file for mondo
    66testfalse = TRUE
     7# For msg tests
     8logfile = "/tmp/mondo-test.log"
     9loglevel = 3
  • trunk/mondo/src/test/test-conf.c

    • Property svn:eol-style set to native
    r900 r1079  
    77
    88#include <stdio.h>
    9 #include "my-stuff.h"
     9#include <stdlib.h>
     10
    1011#include "mr_conf.h"
    1112#include "mr_mem.h"
     
    1415int g_buffer_pid = 0;
    1516
    16 main() {
     17int main(void) {
    1718    int ret = 0;
    1819    int i = 0;
  • trunk/mondo/src/test/test-conf.res

    r561 r1079  
    11Integer : ***3***
    22Float : ***32.670000***
    3 String : ***"The big string"***
     3String : ***The big string***
  • trunk/mondo/src/test/test-string.c

    • Property svn:eol-style set to native
    r900 r1079  
    66 */
    77
    8 #define _GNU_SOURCE
    98#include <string.h>
    109#include <stdlib.h>
    1110#include <stdio.h>
    1211
    13 #include "my-stuff.h"
    1412#include "mr_str.h"
    1513#include "mr_mem.h"
    1614
    17 main() {
     15int main(void) {
    1816    const char delims[3] = ": \n";
    1917   
     
    3129    }
    3230    mr_free(string);
     31
    3332    exit(0);
    3433}
  • trunk/mondo/src/test/test-string.res

    r561 r1079  
    66token=|hda1[0]|, lastpos=28
    77token=|hda12[3]|, lastpos=37
    8 token=|hda6[2]]|, lastpos=45
    9 token=|hda5[1]]|, lastpos=53
     8token=|hda6[2]|, lastpos=45
     9token=|hda5[1]|, lastpos=53
  • trunk/tools/build2pkg

    r1043 r1079  
    5656    pv=`basename $src .tar.gz`
    5757    PVER=`echo $pv | sed "s|^$p-||" | cut -d- -f1`
     58
     59    if [ _"$p" = _"mindi" ]; then
     60        # Copy FindDistroFailsafe if it makes sense for that distro
     61        tar xfz $src $p-${PVER}/distributions/${ddir}-$dver/FindDistroFailsafe 2> /dev/null
     62        ln $p-${PVER}/distributions/${ddir}-$dver/FindDistroFailsafe $p-${PVER} 2> /dev/null
     63    fi
    5864
    5965    if [  _"$dtype" = _"rpm" ]; then
  • trunk/tools/distro-env

    r1043 r1079  
    2929        elif grep -q CentOS /etc/redhat-release ; then
    3030            export ddir="centos"
    31             export dver=`awk '{print $3}' /etc/redhat-release`
     31            export dver=`awk '{print $3}' /etc/redhat-release | cut -d. -f1`
    3232        else
    3333            export ddir="redhat"
  • trunk/tools/mval

    • Property svn:executable set to *
    r729 r1079  
    1 valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes
     1valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes $*
  • trunk/tools/quality

    r900 r1079  
    3131    echo "monodrescue $s usage : "
    3232    tot=0
    33     for i in `find . -name '*.c' -o -name '*.h' |  egrep -v '\.svn|/\*|monitas' | xargs grep -r -c -w $s | egrep -v ":0$"`; do
     33    for i in `find . -name '*.c' -o -name '*.h' |  egrep -v '\.svn|/\*|monitas|mindi-busybox' | xargs grep -r -c -w $s | egrep -v ":0$"`; do
    3434            echo " === $i"
    3535            ((tot=$tot+`echo $i | cut -d: -f2`))
     
    4040echo " "
    4141echo "Qualimetry: "
    42 find . -name '*.c' -o -name '*.h' |  egrep -v '\.svn' | xargs grep -r asprintf | egrep -v '/\*' | egrep -v 'asprintf\(&' > /tmp/mondo.quality
     42find . -name '*.c' -o -name '*.h' |  egrep -v '\.svn|/\*|monitas|/\*|mindi-busybox' | xargs grep -r asprintf | egrep -v '/\*' | egrep -v 'asprintf\(&' > /tmp/mondo.quality
    4343cat /tmp/mondo.quality
    4444echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` asprintf without &"
    45 find . -name '*.c' -o -name '*.h' |  egrep -v '\.svn' | xargs grep -r getline | egrep -v '/\*' | egrep -v 'getline\(&' > /tmp/mondo.quality
     45find . -name '*.c' -o -name '*.h' |  egrep -v '\.svn|/\*|monitas|/\*|mindi-busybox' | xargs grep -r getline | egrep -v '/\*' | egrep -v 'getline\(&' > /tmp/mondo.quality
    4646cat /tmp/mondo.quality
    4747echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` getline without &"
  • trunk/tools/svn2build

    r1043 r1079  
    8080                exit -1
    8181            fi
    82             echo "Using $inc customization to build SPEC file"
    8382
    8483            $TOOLHOME/mkchangelog.pl $dtype $p $MONDOTMP/$p.spec
  • trunk/website/docs.shtml

    r729 r1079  
    1313    <h2>Mondo Rescue HOWTO</h2>
    1414  </div>
     15  <p>The Mondo Rescue FAQ is available on our wiki:</p>
     16  <ul>
     17          <li>A <a href="http://trac.mondorescue.org/wiki/FAQ" target="_blank">Mondo Rescue FAQ</a> page.</li>
     18  </ul>
     19  Consult it before asking questions on the mailing list. Please read as well the following docs.
    1520  <p>The Mondo Rescue HOWTO is available under various formats:</p>
    1621  <ul>
Note: See TracChangeset for help on using the changeset viewer.