Changeset 1010 in MondoRescue
- Timestamp:
- Dec 21, 2006, 8:04:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/mindi
r1009 r1010 63 63 64 64 # ide-probe-mod 65 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 "65 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" 66 66 PCMCIA_MODS="pcmcia_core ds yenta_socket" 67 67 USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd usbkbd usbhid" … … 127 127 echo -en "label memtest\n kernel memdisk\n append initrd=memtest.img\n\n" 128 128 fi 129 }130 131 132 AbortIfYourDistroIsAPieceOfStercus() {133 which which > /dev/null 2> /dev/null || Die "Please install 'which'."134 which strings > /dev/null 2> /dev/null || Die "Please install binutils and libbinutils; you have no 'strings' executable."135 which gawk > /dev/null 2> /dev/null || Die "Gawk is missing from your computer. Please install gawk. You may find the package on Debian's website. How did I know you're running Debian? Because only Debian would be stupid enough not to include gawk in your distribution."136 which gawk > /dev/null 2> /dev/null && AWK=`which gawk 2>/dev/null` || AWK="`which awk 2>/dev/null`"137 if which awk &> /dev/null ; then138 if ! which gawk &> /dev/null ; then139 LogIt "You have awk but not gawk.\nPlease note that mindi works fine with a _sane_ awk binary.\nIf your awk binary misbehaves then please contact your vendor\nor distribution's mailing list for technical support.\n"140 fi141 fi142 which mke2fs > /dev/null 2> /dev/null || Die "Please put mke2fs in system path"143 [ ! -e "$FDISK" ] && Die "Cannot find (s)fdisk"144 }145 146 147 AbortIfMkfsVfatMissing() {148 #if grep -F "vfat" /etc/fstab &> /dev/null ; then149 if ! which mkfs.vfat &> /dev/null ; then150 Die "mkfs.vfat missing from your filesystem - please install your dosfstools RPM or DEB package. Perhaps your PATH environmental variable is broken, too?"151 fi152 #fi153 129 } 154 130 … … 598 574 599 575 600 FindHomeOfMindiAndMondo() {601 [ "$MINDI_PREFIX" = "XXX" ] && Die "Mindi has not been installed correctly."602 echo "MINDI_LIB = $MINDI_LIB" >> $LOGFILE603 echo "MINDI_SBIN = $MINDI_SBIN" >> $LOGFILE604 [ "$MINDI_CONF" = "YYY" ] && Die "Mindi has not been installed correctly."605 echo "MINDI_CONF = $MINDI_CONF" >> $LOGFILE606 echo "MONDO_SHARE = $MONDO_SHARE" >> $LOGFILE607 }608 609 610 576 FindIsolinuxBinary() { 611 577 ISOLINUX=/usr/lib/isolinux.bin … … 630 596 else 631 597 LILO_EXE=`which false` 632 fi633 }634 635 636 FindELiloBinary() {637 if which elilo &> /dev/null ; then638 LILO_EXE=elilo639 else640 LILO_EXE=`which false`641 fi642 }643 644 645 FixPathIfBroken() {646 if [ -e "/sbin/mkfs" ] && ! which mkfs &> /dev/null ; then647 PATH=$PATH:/sbin:/usr/sbin648 export PATH649 echo "Your PATH did not include /sbin or /usr/sbin. I have fixed that, temporarily." >> $LOGFILE650 echo "However, you may wish to ask your vendor to provide a permanent fix..." >> $LOGFILE651 echo "You might like to call 'su -' instead of 'su', for example." >> $LOGFILE652 598 fi 653 599 } … … 1586 1532 old_pwd=`pwd` 1587 1533 cd $MINDI_TMP/iso 1588 mkdir -p $MONDO_ROOT/iso/isolinux1589 1534 echo "mindi_lib = $MINDI_LIB" >> $LOGFILE 1590 1535 for i in memdisk memtest.bin memtest.img ; do … … 1599 1544 done 1600 1545 MakeSyslinuxMessageFile $MINDI_TMP/iso/isolinux/message.txt 1601 cp $kernelpath $MINDI_TMP/iso/isolinux/vmlinuz 2> /dev/null || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/isolinux/vmlinuz). Did you run out of disk space?" 1546 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?" 1547 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?" 1602 1548 cp $MINDI_TMP/mindi.rdz $MINDI_TMP/iso/isolinux/initrd.img 2>> $LOGFILE 1603 cp $MINDI_TMP/mindi.rdz $ CACHE_LOC/initrd.img 2>> $LOGFILE1549 cp $MINDI_TMP/mindi.rdz $MONDO_ROOT/initrd.img 2>> $LOGFILE 1604 1550 [ -e "$iso_cfg_file" ] || Die "FIXME - unable to find $iso_cfg_file - this should never occur" 1605 1551 cd $MINDI_TMP/iso/isolinux … … 2726 2672 [ -e "/sbin/mkdosfs" ] && [ ! -e "/sbin/mkfs.vfat" ] && ln -sf /sbin/mkdosfs /sbin/mkfs.vfat 2727 2673 2728 FindHomeOfMindiAndMondo 2674 # Log some capital variables 2675 [ "$MINDI_PREFIX" = "XXX" ] && Die "Mindi has not been installed correctly." 2676 echo "MINDI_LIB = $MINDI_LIB" >> $LOGFILE 2677 echo "MINDI_SBIN = $MINDI_SBIN" >> $LOGFILE 2678 [ "$MINDI_CONF" = "YYY" ] && Die "Mindi has not been installed correctly." 2679 echo "MINDI_CONF = $MINDI_CONF" >> $LOGFILE 2680 echo "MONDO_SHARE = $MONDO_SHARE" >> $LOGFILE 2681 2729 2682 trap AbortHere SIGTERM SIGHUP SIGQUIT SIGKILL SIGABRT SIGINT 2730 AbortIfYourDistroIsAPieceOfStercus 2683 2684 # Sanity checks 2685 which which > /dev/null 2> /dev/null || Die "Please install 'which'." 2686 which strings > /dev/null 2> /dev/null || Die "Please install binutils and libbinutils; you have no 'strings' executable." 2687 which gawk > /dev/null 2> /dev/null || Die "Gawk is missing from your computer. Please install gawk. You may find the package on Debian's website. How did I know you're running Debian? Because only Debian would be stupid enough not to include gawk in your distribution." 2688 which gawk > /dev/null 2> /dev/null && AWK=`which gawk 2>/dev/null` || AWK="`which awk 2>/dev/null`" 2689 if which awk &> /dev/null ; then 2690 if ! which gawk &> /dev/null ; then 2691 LogIt "You have awk but not gawk.\nPlease note that mindi works fine with a _sane_ awk binary.\nIf your awk binary misbehaves then please contact your vendor\nor distribution's mailing list for technical support.\n" 2692 fi 2693 fi 2694 which mke2fs > /dev/null 2> /dev/null || Die "Please put mke2fs in system path" 2695 [ ! -e "$FDISK" ] && Die "Cannot find (s)fdisk" 2696 2731 2697 [ "`uname -r | grep "2.4.[0-6]" | grep -v "2.4.[0-9][0-9]"`" != "" ] && echo "WARNING! Your kernel may have buggy loopfs code. Consider upgrading to 2.4.7" 2732 2698 # If we have a 2.6 kernel, the system uses module-init-tools which means that we … … 2744 2710 [ ! -e "/etc/modules.conf" ] && Die "/etc/modules.conf not found; you may have to create a softlink from /etc/conf.modules to /etc/modules.conf; of course, all good distros use modules.conf anyway..." 2745 2711 fi 2746 FixPathIfBroken 2712 2713 # Update the PATH variable if incomplete 2714 if [ -e "/sbin/mkfs" ] && ! which mkfs &> /dev/null ; then 2715 PATH=$PATH:/sbin:/usr/sbin 2716 export PATH 2717 echo "Your PATH did not include /sbin or /usr/sbin. I have fixed that, temporarily." >> $LOGFILE 2718 echo "However, you may wish to ask your vendor to provide a permanent fix..." >> $LOGFILE 2719 echo " Or you might like to call 'su -' instead of 'su', for example." >> $LOGFILE 2720 fi 2721 2747 2722 [ -f "$MINDI_LIB/vmlinuz" ] && FAILSAFE_KVER=`strings $MINDI_LIB/vmlinuz 2> /dev/null | grep -E "2\.[46]" | cut -d' ' -f1` 2748 AbortIfMkfsVfatMissing 2723 2724 if ! which mkfs.vfat &> /dev/null ; then 2725 Die "mkfs.vfat missing from your filesystem - please install your dosfstools RPM or DEB package. Perhaps your PATH environmental variable is broken, too?" 2726 fi 2727 2749 2728 ### BERLIOS 2750 2729 ### Fix as it's not mandatory on ia64 2751 2730 if [ "$ARCH" = "ia64" ] ; then 2752 FindELiloBinary 2731 if which elilo &> /dev/null ; then 2732 LILO_EXE=elilo 2733 else 2734 LILO_EXE=`which false` 2735 fi 2753 2736 else 2754 2737 FindIsolinuxBinary … … 2763 2746 MAX_COMPRESSED_SIZE=1300 2764 2747 kernelpath="" 2765 MONDO_ROOT= $TMPMONDO/mondo-root2748 MONDO_ROOT=/var/cache/mondo 2766 2749 mkdir -p $MONDO_ROOT 2767 2750 … … 2813 2796 # Change MINDI_TMP for the one provided by mondo 2814 2797 # So that it can get back the built files 2815 rm -rf $MINDI_TMP 2798 mv $MINDI_TMP/* $MINDI_TMP/.??* $MONDO_TMP 2> /dev/null 2799 rmdir $MINDI_TMP 2816 2800 MINDI_TMP=$MONDO_TMP 2817 2801 mkdir -p $MINDI_TMP 2802 # This is the scratch dir in mondo 2818 2803 CACHE_LOC=$3 2819 2804 if [ _"$CACHE_LOC" != _"" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.