Ignore:
Timestamp:
Nov 6, 2007, 11:01:53 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • Better output for mindi-busybox revision
  • Remove dummy file created on NFS - report from Arnaud Tiger <arnaud.tiger_at_hp.com>
  • strace useful for debug
  • fix new versions for pb (2.0.0 for mindi and 1.7.2 for mindi-busybox)
  • fix build process for mindi-busybox + options used in that version (dd for label-partitions-as-necessary)
  • fix typo in label-partitions-as-necessary which doesn't seem to work
  • Update to busybox 1.7.2
  • perl is now required at restore time to support uuid swap partitions (and will be used for many other thigs

in the future for sure)

  • next mindi version will be 2.0.0 due to all the changes made in it (udev may break working distros)
  • small optimization in mindi on keyboard handling (one single find instead of multiple)
  • better interaction for USB device when launching mindi manually
  • attempt to automatically guess block disk size for ramdisk
  • fix typos in bkphw
  • Fix the remaining problem with UUID support for swap partitions
  • Updates mondoarchive man page for USB support
  • Adds preliminary Hardware support to mindi (Proliant SSSTK)
  • Tries to add udev support also for rhel4
  • Fix UUID support which was still broken.
  • Be conservative in test for the start-nfs script
  • Update config file for mindi-busybox for 1.7.2 migration
  • Try to run around a busybox bug (1.2.2 pb on inexistant links)
  • Add build content for mindi-busybox in pb
  • Remove distributions content for mindi-busybox
  • Fix a warning on inexistant raidtab
  • Solve problem on tmpfs in restore init (Problem of inexistant symlink and busybox)
  • Create MONDO_CACHE and use it everywhere + creation at start
  • Really never try to eject a USB device
  • Fix a issue with &> usage (replaced with 1> and 2>)
  • Adds magic file to depllist in order to have file working + ldd which helps for debugging issues
  • tty modes correct to avoid sh error messages
  • Use ext3 normally and not ext2 instead
  • USB device should be corrected after reading (take 1st part)
  • Adds a mount_USB_here function derived from mount_CDROM_here
  • usb detection place before /dev detection in device name at restore time
  • Fix when restoring from USB: media is asked in interactive mode
  • Adds USB support for mondorestore
  • mount_cdrom => mount_media
  • elilo.efi is now searched throughout /boot/efi and not in a fixed place as there is no standard
  • untar-and-softlink => untar (+ interface change)
  • suppress useless softlinks creation/removal in boot process
  • avoids udevd messages on groups
  • Increase # of disks to 99 as in mindi at restore time (should be a conf file parameter)
  • skip existing big file creation
  • seems to work correctly for USB mindi boot
  • Adds group and tty link to udev conf
  • Always load usb-torage (even 2.6) to initiate USB bus discovery
  • Better printing of messages
  • Attempt to fix a bug in supporting OpenSusE 10.3 kernel for initramfs (mindi may now use multiple regex for kernel initrd detection)
  • Links were not correctly done as non relative for modules in mindi
  • exclusion of modules denied now works
  • Also create modules in their ordinary place, so that classical modprobe works + copy modules.dep
  • Fix bugs for DENY_MODS handling
  • Add device /dev/console for udev
  • ide-generic should now really be excluded
  • Fix a bug in major number for tty
  • If udev then adds modprobe/insmod to rootfs
  • tty0 is also cretaed with udev
  • ide-generic put rather in DENY_MODS
  • udevd remove from deplist s handled in mindi directly
  • better default for mindi when using --usb
  • Handles dynamically linked busybox (in case we want to use it soon ;-)
  • Adds fixed devices to create for udev
  • ide-generic should not be part of the initrd when using libata v2
  • support a dynamically linked udev (case on Ubuntu 7.10 and Mandriva 2008.0 so should be quite generic) This will give incitation to move to dyn. linked binaries in the initrd which will help for other tasks (ia6 4)
  • Improvement in udev support (do not use cl options not available in busybox)
  • Udev in mindi
    • auto creation of the right links at boot time with udev-links.conf(from Mandriva 2008.0)
    • rework startup of udev as current makes kernel crash (from Mandriva 2008.0)
    • add support for 64 bits udev
  • Try to render MyInsmod? silent at boot time
  • Adds udev support (mandatory for newest distributions to avoid remapping of devices in a different way as on the original system)
  • We also need vaft format support for USB boot
  • Adds libusual support (Ubuntu 7.10 needs it for USB)
  • Improve Ubuntu/Debian? keyboard detection and support
  • pbinit adapted to new pb (0.8.10). Filtering of docs done in it
  • Suppress some mondo warnings and errors on USB again
  • Tries to fix lack of files in deb mindi package
  • Verify should now work for USB devices
  • More log/mesages improvement for USB support
  • - Supress g_erase_tmpdir_and_scratchdir
  • Improve some log messages for USB support
  • Try to improve install in mindi to avoid issues with isolinux.cfg not installed vene if in the pkg :-(
  • Improve mindi-busybox build
  • In conformity with pb 0.8.9
  • Add support for Ubuntu 7.10 in build process
  • Add USB Key button to Menu UI (CD streamer removed)
  • Attempt to fix error messages on tmp/scratch files at the end by removing those dir at the latest possible.
  • Fix a bug linked to the size of the -E param which could be used (Arnaud Tiger/René? Ribaud).
  • Integrate ~/.pbrc content into mondorescue.pb (required project-builder >= 0.8.7)
  • Put mondorescue in conformity with new pb filtering rules
  • Add USB support at restore time (no test done yet). New start-usb script PB varibale added where useful
  • Unmounting USB device before removal of temporary scratchdir
  • Stil refining USB copy back to mondo (one command was not executed)
  • No need to have the image subdor in the csratchdir when USB.
  • umount the USB partition before attempting to use it
  • Remove useless copy from mindi to mondo at end of USB handling

(risky merge, we are raising the limits of 2 diverging branches. The status of stable is not completely sure as such. Will need lots of tests, but it's not yet done :-()
(merge -r1692:1769 $SVN_M/branches/2.2.5)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/mindi

    r1693 r1770  
    416416    dd if=/dev/zero of=$imagefile bs=1k count=1440 &> /dev/null || LogIt "Cannot dd (CODI)"
    417417    echo "Creating ext2 filesystem on $imagefile" >> $LOGFILE
    418     mke2fs -N 12 -F $imagefile &> /dev/null || Die "Unable to create an ext2 file system on $imagefile"
     418    mke2fs -N 12 -F $imagefile >> $LOGFILE 2>> $LOGFILE || Die "Unable to create an ext2 file system on $imagefile"
    419419    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."
    420420    mv $tarball $mountpoint/
     
    511511    [ ! -e "$KEYDIR" ] && KEYDIR=/usr/lib/kbd
    512512    [ ! -e "$KEYDIR" ] && KEYDIR=/usr/share
     513    [ ! -e "$KEYDIR" ] && KEYDIR=/etc/condole
     514    [ ! -e "$KEYDIR" ] && KEYDIR=/etc/condole-setup
    513515    if [ ! -e "$KEYDIR" ] ; then
    514516        LogIt "Keyboard mapping directory not found. I shall use default map at boot-time."
     
    532534        mkdir -p $bigdir/etc/console
    533535        cp /etc/console/boottime.kmap.gz $bigdir/etc/console 2>> $LOGFILE
     536        echo -e "$DONE"
     537        return 0
     538    elif [ -e "/etc/console-setup/boottime.kmap.gz" ] ; then
     539        echo "Ubuntu-style config detected." >> $LOGFILE
     540        echo -en "Adding the following keyboard mapping tables: "
     541        mkdir -p $bigdir/tmp
     542        echo "/etc/console-setup/boottime.kmap.gz" > $bigdir/tmp/KEYMAP-LIVES-HERE
     543        KBDEPTH=0
     544        mkdir -p $bigdir/etc/console-setup
     545        cp /etc/console-setup/boottime.kmap.gz $bigdir/etc/console-setup 2>> $LOGFILE
    534546        echo -e "$DONE"
    535547        return 0
     
    860872    local lcMagicCramfs="<3>cramfs: wrong magic"
    861873    local lcMagicExt2fs="<3>EXT2-fs: blocksize too small for device."
    862     local lcMagicInitfs="<6>checking if image is initramfs..."
     874    local lcMagicInitfs="<6>checking if image is initramfs...|<6>Unpacking initramfs..."
    863875
    864876    # local variables
     
    874886
    875887    # Kernel may be gzip compressed
    876     file $lvKernelImage 2>&1 | grep -q  gzip
     888    file $lvKernelImage 2>&1 | grep -q gzip
    877889    if [ $? -eq 0 ]; then
    878         lvScanRes=`gzip -cd $lvKernelImage | strings | grep -e "$lcMagicCramfs" -e "$lcMagicExt2fs" -e "$lcMagicInitfs"`
     890        lvScanRes=`gzip -cd $lvKernelImage | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicInitfs"`
    879891    else
    880892        # get offet of gzip magic "1f8b0800" in file
     
    885897
    886898        # scan kernel image for initrd filessystem support
    887         lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c 2> /dev/null | strings | grep -e "$lcMagicCramfs" -e "$lcMagicExt2fs" -e "$lcMagicInitfs"`
     899        lvScanRes=`dd ibs=1 skip=$lvOffset if=$lvKernelImage obs=1M 2>/dev/null | gunzip -c 2> /dev/null | strings | grep -E "$lcMagicCramfs|$lcMagicExt2fs|$lcMagicInitfs"`
    888900    fi
    889901
    890902    # determine which filesystem to use for initrd image: ext2fs, gzip'ed cpio (initramfs ) or cramfs
    891     if [ `echo $lvScanRes | grep -c "$lcMagicExt2fs"` -eq 1 ]; then
     903    if [ `echo $lvScanRes | grep -Ec "$lcMagicExt2fs"` -eq 1 ]; then
    892904        lvUseFilesystem="ext2fs"
    893     elif [ `echo $lvScanRes | grep -c "$lcMagicInitfs"` -eq 1 ]; then
     905    elif [ `echo $lvScanRes | grep -Ec "$lcMagicInitfs"` -eq 1 ]; then
    894906        lvUseFilesystem="initramfs"
    895     elif [ `echo $lvScanRes | grep -c "$lcMagicCramfs"` -eq 1 ]; then
     907    elif [ `echo $lvScanRes | grep -Ec "$lcMagicCramfs"` -eq 1 ]; then
    896908        lvUseFilesystem="cramfs"
    897909    else
     
    942954    local res currline partition all_partitions ap_orig remaining i j
    943955
    944     grep -vx " *#.*" $MY_FSTAB | grep -vx " *none.*" | $AWK '/^\/dev\/[imhs]d||^LABEL\=\/|^UUID=/ && !/fdd|cdr|zip|floppy/ {print $1}'
     956    grep -vx " *#.*" $MY_FSTAB | grep -vx " *none.*" | $AWK '/^\/dev\/[imhs]d||^LABEL=\/|^UUID=/ && !/fdd|cdr|zip|floppy/ {print $1}'
    945957    [ -e "/etc/raidtab" ] && $AWK '/^ *device/ {print $2}' /etc/raidtab
    946958    return
     
    966978    for i in $DENY_MODS; do
    967979        module_list=`echo ${module_list} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
     980        EXTRA_MODS=`echo ${EXTRA_MODS} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
    968981    done
    969982###
     
    9931006LocateDeps() {
    9941007    local incoming fname deps
    995     incoming="$1"
     1008    incoming="$*"
    9961009    for fname in $incoming ; do
    9971010        if [ ! -e "$fname" ] ; then
     
    11061119   
    11071120    echo -en "for outerloop in 1 2 3 4 5 ; do\necho -en \".\"\n" >> $outfile
    1108     # BERLIOS: That code is duplicated - Should be done once only
    11091121    list_to_echo="$MODULES"
    11101122    # Remove unwanted modules from list
    11111123    for i in $DENY_MODS; do
    11121124        list_to_echo=`echo ${list_to_echo} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
     1125        EXTRA_MODS=`echo ${EXTRA_MODS} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
    11131126    done
    11141127
     
    11201133        infile="/etc/modules.conf"
    11211134    fi
     1135
    11221136    for module in $list_to_echo $EXTRA_MODS ; do
    11231137        params=`sed -n "s/^options \\+$module \\+//p" $infile`
     
    11841198    done
    11851199    [ "$IMAGE_DEVS" != "" ] && all_partitions="`echo "$all_partitions $IMAGE_DEVS" | tr ' ' '\n' | sort -u | tr '\n ' ' '`"
    1186     printf "        %-15s %-15s %-15s %-15s %-15s %-15s\n" DEVICE MOUNTPOINT FORMAT "SIZE (MB)" LABEL UUID | tee -a $LOGFILE
     1200    printf "        %-15s %-15s %-15s %-15s %-15s\n" DEVICE MOUNTPOINT FORMAT "SIZE (MB)" LABEL/UUID | tee -a $LOGFILE
    11871201    useless_dev="/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw /dev/scd /dev/ram :/ /dev/sr0 /dev/sr1 /dev/cdrom1"
    11881202    for c_p in $all_partitions ; do
     
    14361450            fi
    14371451        fi
     1452        if [ "$redhat_label" ]; then
     1453            label="$redhat_label"
     1454        elif [ "$uuid" ]; then
     1455            label="$uuid"
     1456        fi
    14381457        partition_format="`echo "$partition_format" | cut -d',' -f1`"; # in case user has ext3,ext2 or something dumb like that
    14391458        [ "$partition_format" = "auto" ] && partition_format="`mount | grep -w $current_partition | $AWK '{print$5;}'`"; # in case user uses 'auto' (dumb!)
    1440         unofficial_outstring=`printf "\t%-15s %-15s %-15s %7s %-15s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" $uuid`
     1459        unofficial_outstring=`printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$label"`
    14411460        if [ "$current_partition" = "" ] ; then
    14421461            echo "Unknown partition (outstring = $unofficial_outstring)" >> $LOGFILE
     
    14451464                partition_mountpt=raid
    14461465                partition_format=raid
    1447                 printf "\t%-15s %-15s %-15s %7s %-15s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" $uuid | tee -a $LOGFILE
    1448                 printf "%s %s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" $uuid >> $mountlist
     1466                printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$label" | tee -a $LOGFILE
     1467                printf "%s %s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$label" >> $mountlist
    14491468            else
    14501469                echo "Unknown mountpoint (outstring = $unofficial_outstring)" >> $LOGFILE
     
    14611480                partition_format="vfat"
    14621481            fi
    1463             printf "\t%-15s %-15s %-15s %7s %-15s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$redhat_label" $uuid | tee -a $LOGFILE
    1464             printf "%s %s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$redhat_label" $uuid >> $mountlist
     1482            printf "\t%-15s %-15s %-15s %7s %-15s\n" $current_partition $partition_mountpt $partition_format $psz "$label" | tee -a $LOGFILE
     1483            printf "%s %s %s %s %s\n" $current_partition $partition_mountpt $partition_format $partition_size "$label" >> $mountlist
    14651484        fi
    14661485    done
     
    16081627    local i old_pwd
    16091628    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ _"$MONDO_SHARE" = _"" ]; then
    1610         echo "Shall I make a bootable USB image ?"
    1611         echo -en "WARNING: This will erase all content on $USBDEVICE (y/[n]) "
     1629        echo "Shall I make a bootable USB image ? (y/[n] "
    16121630        read i
    16131631        [ "$i" != "y" ] && [ "$i" != "Y" ] && return 0
     1632        if [ "$USBDEVICE" = "" ]; then
     1633            echo -en "Please enter the device name of your USB device (e.g. /dev/sda) : "
     1634            read dev
     1635            USBDEVICE=$dev
     1636        fi
     1637        echo "WARNING: This will erase all content on $USBDEVICE"
     1638        echo -en "Are you sure you want to use $USBDEVICE (y/[n]) "
    16141639    fi
    16151640    if [ _"$MINDI_TMP" = _"" ]; then
     
    16321657    echo -en "."
    16331658    echo "Unmounting $USBDEVICE just in case" >> $LOGFILE
    1634     umount $USBDEVICE 2>&1 >> $LOGFILE
     1659    umount $USBPART 2>> $LOGFILE 1>> $LOGFILE
    16351660    echo "Erasing $USBDEVICE" >> $LOGFILE
    1636     $FDISK $USBDEVICE 2>&1 >> $LOGFILE << EOF
     1661    $FDISK $USBDEVICE 2>> $LOGFILE 1>> $LOGFILE << EOF
    16371662d
    16381663d
     
    16881713            cp -f $j $k 2> /dev/null || Die "Failed to copy $j to $k"
    16891714            cp -f $j $MINDI_TMP 2> /dev/null || Die "Failed to copy $j to $MINDI_TMP"
    1690             if [ _"$MONDO_SHARE" != _"" ]; then
    1691                 cp -f $j $MONDO_ROOT 2>> $LOGFILE || Die "Failed to copy $j to $MONDO_ROOT"
    1692             fi
    16931715        fi
    16941716    done
     
    17081730    cd $old_pwd
    17091731    echo -en "."
     1732    umount $MINDI_TMP/usb
    17101733    if [ "$ARCH" != "ia64" ] ; then
    1711         if [ _"$MONDO_SHARE" != _"" ]; then
    1712             cp -f $MONDO_SHARE/autorun $MONDO_ROOT 2>> $LOGFILE
    1713         fi
    1714         umount $MINDI_TMP/usb
    17151734        syslinux $USBPART 2>> $MINDI_TMP/syslinux.log
    17161735        if [ "$?" -ne "0" ] ; then
     
    17251744    else
    17261745        echo "No USB boot support for ia64" | tee -a $LOGFILE
    1727         umount $MINDI_TMP/usb
    17281746        MindiExit -1
    17291747    fi
     
    18781896            mountefi=1
    18791897        fi
    1880         cp /boot/efi/elilo.efi $mountpoint
     1898        el=`find /boot/efi -name elilo.efi`
     1899        cp $el $mountpoint
    18811900        cp $liloconf $mountpoint/elilo.efi $mountpoint/efi/boot
    18821901        if [ $mountefi -eq 1 ]; then
     
    21972216        incoming=`echo "$incoming" | awk '{if (match($1,/\//)) {print $1} else {if (match($3,/\//)) print $3} fi}'`
    21982217        for f in $incoming ; do
    2199             echo "$f `ReadAllLink $f`"
     2218            echo "$f"
     2219            echo "`ReadAllLink $f`"
    22002220        done
    22012221        read incoming
     
    25462566    echo -en "..."
    25472567    echo "Creating ext2 filesystem on $tempfile" >> $LOGFILE
    2548     mke2fs -b 1024 -m 1 -i 2048 -F $tempfile &> /dev/null || Die "Unable to create an ext2 file system on $tempfile"
     2568    mke2fs -b 1024 -m 1 -i 2048 -F $tempfile >> $LOGFILE 2>> $LOGFILE || Die "Unable to create an ext2 file system on $tempfile"
    25492569    echo -en "..."
    25502570    mkdir -p $mountpoint
     
    25692589    mkdir -p tmp
    25702590    [ -e "/dev/.devfsd" ] && echo "/dev/.devfsd found" > tmp/USE-DEVFS
     2591
     2592    # Management of udev (which includes modprobe in rules)
     2593    ps auxww | grep -v grep | grep -qw udevd
     2594    if [ $? -eq 0 ]; then
     2595        echo "udev device manager found" > tmp/USE-UDEV
     2596        LogIt "udev device manager found"
     2597        cp --parents -Rdf /etc/udev . 2> /dev/null
     2598        cp --parents -Rdf /lib/udev /lib64/udev . 2> /dev/null
     2599        if [ -x /sbin/udevd ]; then
     2600            lis=`grep -Ev '^#' $MINDI_CONF/udev.files`
     2601            LocateDeps $lis > $MINDI_TMP/udev.lis
     2602            for i in $lis; do
     2603                if [ "`echo $i | cut -c1`" = "/" ]; then
     2604                    j=`echo $i | cut -c2-`
     2605                    rm -f $j
     2606                fi
     2607            done
     2608            cp --parents -Rdf $lis `sort -u $MINDI_TMP/udev.lis` .
     2609            rm -f $MINDI_TMP/udev.lis
     2610        else
     2611            echo "udevd daemon not in standard place (/sbin)" 2>&1 | tee -a $LOGFILE
     2612            echo "mindi will use static devices which may cause problems" 2>&1 | tee -a $LOGFILE
     2613            rm -f tmp/USE-UDEV
     2614        fi
     2615    fi
     2616    # Management of potential HW info (Proliant only at the moment)
     2617    mindi-bkphw $MINDI_CACHE $MINDI_CONF | tee -a $LOGFILE
     2618    if [ -d $MINDI_CACHE/bkphw ]; then
     2619        LogIt "Hardware Information found and saved ..."
     2620        cp -rp $MINDI_CACHE/bkphw .
     2621        lis=`grep -Ev '^#' $MINDI_CACHE/tools.files`
     2622        LocateDeps $lis > $MINDI_TMP/tools.lis
     2623        cp --parents -Rdf $lis `sort -u $MINDI_TMP/tools.lis` .
     2624        if [ -f $MINDI_CACHE/mindi-rsthw ]; then
     2625            mv -f $MINDI_CACHE/mindi-rsthw .
     2626            chmod 755 ./mindi-rsthw
     2627        fi
     2628        rm -f $MINDI_TMP/tools.lis $MINDI_CACHE/tools.files
     2629    fi
     2630
    25712631    for w in cdrom floppy groovy-stuff ; do
    25722632        mkdir -p mnt/$w
     
    25802640
    25812641    cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
     2642
     2643    # Handle the case where busybox is dynamically linked
     2644    file $MINDI_LIB/rootfs/bin/busybox 2>&1 | grep -q "dynamically"
     2645    if [ $? -eq 0 ]; then
     2646        LocateDeps $MINDI_LIB/rootfs/bin/busybox > $MINDI_TMP/busy.lis
     2647        cp --parents -Rdf `sort -u $MINDI_TMP/busy.lis` .
     2648        rm -f $MINDI_TMP/busy.lis
     2649    fi
    25822650    cd $old_pwd
    25832651    echo -en "..."
     
    26042672        list_of_groovy_mods="$list_of_groovy_mods $NET_MODS"
    26052673    fi
    2606     [ -e "$needed_modules_path" ] || LogIt "path $needed_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
     2674    if [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then
     2675        list_of_groovy_mods="$list_of_groovy_mods $EXTRA_MODS"
     2676    fi
     2677    for i in $DENY_MODS; do
     2678        echo "Removing $i from the list of modules to load" >> $LOGFILE
     2679        list_of_groovy_mods=`echo ${list_of_groovy_mods} | tr ' ' '\n' | grep -Ev "^${i}$" | tr '\n' ' '`
     2680    done
     2681
     2682    [ -e "$floppy_modules_path" ] || LogIt "path $floppy_modules_path does not exist.\n If you're not using a modular kernel then you're NUTS."
    26072683    for i in $list_of_groovy_mods ; do
    26082684        needed_modules="$needed_modules `FindSpecificModuleInPath $needed_modules_path $i`"
     
    26122688        [ "$YOUR_KERNEL_SUCKS" ] && i=$MINDI_TMP/$i
    26132689        echo "Adding $i ($s KB) to the rootfs" >> $LOGFILE
    2614         cp -df $i $mountpoint/ 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
     2690        cp --parents -pdf $i $mountpoint 2>/dev/null || LogIt "Unable to copy $i to $mountpoint"
     2691        if [ "`echo "$i" | grep -F ".gz"`" ]; then
     2692                gunzip -f $mountpoint/$i
     2693                i=`echo $i | sed 's/.gz//'`
     2694        fi
     2695        (cd $mountpoint ; ln -s $i . 2>/dev/null)
    26152696        [ "`echo "$i" | grep -F ".gz"`" ] && gunzip -f $mountpoint/`basename $i`
    26162697    done
     2698    # Also copy modules.dep in case of udev so that normal modprobe works
     2699    p=`echo $i | cut -d/ -f1-3`
     2700    cp -df $p/modules.dep $mountpoint/$p 2>/dev/null || LogIt "Unable to copy modules.dep to $mountpoint"
    26172701    if [ ! -e "/sbin/devfsd" ] || [ "$kernelpath" = "$MINDI_LIB/vmlinuz" ] ; then
    26182702        echo "Deleting devfsd daemon from ramdisk" >> $LOGFILE
     
    28302914fi
    28312915
    2832 if ! which mkfs.vfat &> /dev/null ; then
     2916if ! which mkfs.vfat 1> /dev/null 2> /dev/null ; then
    28332917    Die "mkfs.vfat missing from your filesystem - please install your dosfstools RPM or DEB package. Perhaps your PATH environmental variable is broken, too?"
    28342918fi
     
    29183002    echo "-------------" >> $LOGFILE
    29193003    /usr/sbin/esxcfg-module -l >> $LOGFILE
    2920     MODULES="$MODULES `esxcfg-module -l | awk '{print $1}'`"
     3004    MODULES="$MODULES `/usr/sbin/esxcfg-module -l | awk '{print $1}'`"
    29213005fi
    29223006echo "-------------" >> $LOGFILE
     
    29253009echo "-------------" >> $LOGFILE
    29263010
     3011# Compute libata version
     3012laver=`modinfo libata | grep -Ei '^Version:' | cut -d: -f2 | cut -d. -f1 | sed 's/  *//g'`
     3013# If libata v2 is used then remove ide-generic as it will perturbate boot
     3014if [ "`echo $MODULES | grep libata`" ]; then
     3015    if [ "$laver" = "2" ]; then
     3016        DENY_MODS="$DENY_MODS ide-generic"
     3017        echo "ide-generic removed from module list as your system uses libata v2+" >> $LOGFILE
     3018        echo "-------------" >> $LOGFILE
     3019    fi
     3020fi
    29273021
    29283022FLOPPY_WAS_MOUNTED=""
     
    29823076            MindiExit 0
    29833077        fi
     3078    elif [ "$1" = "--locatedeps" ] ; then
     3079        [ ! "$2" ] && Die "Please specify the binary to look at"
     3080        LocateDeps $2
     3081        # Avoids logfile content for mondo
     3082        export MONDO_SHARE=""
     3083        MindiExit $?
    29843084    elif [ "$1" = "--makemountlist" ] ; then
    29853085        [ ! "$2" ] && Die "Please specify the output file"
     
    30043104        export MINDI_TMP=$MONDO_TMP
    30053105        mkdir -p $MINDI_TMP
    3006         # This is the scratch dir in mondo
     3106        # This is the scratch dir in mondo - subdir images
    30073107        MINDI_CACHE=$3
    30083108        if [ _"$MINDI_CACHE" != _"" ]; then
     
    30503150        fi
    30513151        [ "$CDRECOVERY" = "yes" ] && [ "$PROMPT_MAKE_TAPE_IMAGE" = "yes" ] && Die "Sorry, you can't use --cd-recovery and --write-tapes at the same time"
     3152        # MONDO_ROOT is the real scratchdir
    30523153        MONDO_ROOT=`echo $MINDI_CACHE | sed 's/\(.*\)\/.*/\1/'`
    30533154        if [ _"$MONDO_ROOT" != _"" ]; then
     
    32083309        Die "Cannot find all.tar.gz, to be written to tape"
    32093310    fi
    3210 elif [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ]; then
     3311elif [ "$PROMPT_MAKE_USB_IMAGE" = "yes" ] && [ "$USBDEVICE" != "" ]; then
    32113312    OfferToMakeBootableUSB $MINDI_CACHE
    32123313else
Note: See TracChangeset for help on using the changeset viewer.