Changeset 3258


Ignore:
Timestamp:
Mar 12, 2014, 8:24:33 PM (5 years ago)
Author:
bruno
Message:
  • Should fix #735 by adding a function to detect potential ldlinux.c32 file with syslinux 5.x and addd it to all syslinux media generated Backported in branch 3.0 in order to be able to publish a better 3.0.5 (from r3241)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/mindi

    r3246 r3258  
    482482    rm -f $MINDI_TMP/keymaps.find
    483483    return 0
     484}
     485
     486
     487FindLdlinux32Binary() {
     488    LDLINUXC32=/usr/lib/syslinux/ldlinux.c32
     489    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/lib/syslinux/ldlinux.c32
     490    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/lib64/syslinux/ldlinux.c32
     491    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/share/syslinux/ldlinux.c32
     492    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/share/lib/syslinux/ldlinux.c32
     493    [ ! -e "$LDLINUXC32" ] && LDLINUXC32=/usr/share/lib64/syslinux/ldlinux.c32
     494    #[ ! -e "$LDLINUXC32" ] && LDLINUXC32=`find / -name ldlinux.c32 | grep -x "/.*/ldlinux.c32"`
     495    if [ ! -e "$LDLINUXC32" ]; then
     496        LogFile "INFO: If you use syslinux 5.x, you may miss ldlinux.c32. If your syslinux RPM doesn't include ldlinux.c32, you may want to download another one"
     497        LDLINUXC32=/tmp/idoesnthopefullyexist
     498    else
     499        LogFile "INFO: Found ldlinux.c32 at $LDLINUXC32"
     500    fi
    484501}
    485502
     
    14961513    MakeMessageFile $MINDI_TMP/iso | cut -c1-80 > $MINDI_TMP/iso/message.txt
    14971514    if [ $KERNEL_IS_XEN = "yes" ]; then
     1515        FindMboot32Binary
    14981516        cp $xenkernelpath $MINDI_TMP/iso/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MINDI_TMP/iso/xen.gz). Did you run out of disk space?"
    14991517        cp $MBOOTC32 $MINDI_TMP/iso/mboot.c32  2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MINDI_TMP/iso/mboot.c32). Did you run out of disk space?"
    15001518    fi
     1519    # Useful for syslinux 5.x
     1520    FindLdlinux32Binary
     1521    if [ -e $LDLINUXC32 ]; then
     1522        cp $LDLINUXC32 $MINDI_TMP/iso/ldlinux.c32  2>> $LOGFILE || Die "Cannot copy ldlinux.c32 ($LDLINUXC32) to mindi tmp ($MINDI_TMP/iso/ldlinux.c32). Did you run out of disk space?"
     1523    fi
    15011524    cp $kernelpath $MINDI_TMP/iso/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mindi tmp ($MINDI_TMP/iso/vmlinuz). Did you run out of disk space?"
    15021525    cp $MINDI_TMP/initrd.img $MINDI_TMP/iso/initrd.img 2>> $LOGFILE || Die "Cannot copy initrd.img ($MINDI_TMP/initrd.img) to $MINDI_TMP/iso/initrd.img. Did you run out of disk space?"
     
    15041527    if [ _"$MONDO_SHARE" != _"" ]; then
    15051528        if [ $KERNEL_IS_XEN = "yes" ]; then
    1506             cp $xenkernelpath $MONDO_ROOT/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MINDI_TMP/iso/xen.gz). Did you run out of disk space?"
    1507             cp $MBOOTC32 $MONDO_ROOT/mboot.c32  2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MINDI_TMP/iso/mboot.c32). Did you run out of disk space?"
     1529            cp $xenkernelpath $MONDO_ROOT/xen.gz 2>> $LOGFILE || Die "Cannot copy xen.gz ($xenkernelpath) to mindi tmp ($MONDO_ROOT/iso/xen.gz). Did you run out of disk space?"
     1530            cp $MBOOTC32 $MONDO_ROOT/mboot.c32  2>> $LOGFILE || Die "Cannot copy mboot.c32 ($MBOOTC32) to mindi tmp ($MONDO_ROOT/iso/mboot.c32). Did you run out of disk space?"
     1531        fi
     1532        if [ -e $LDLINUXC32 ]; then
     1533            cp $LDLINUXC32 $MONDO_ROOT/iso/ldlinux.c32  2>> $LOGFILE || Die "Cannot copy ldlinux.c32 ($LDLINUXC32) to $MONDO_ROOT/iso/ldlinux.c32. Did you run out of disk space?"
    15081534        fi
    15091535        cp $kernelpath $MONDO_ROOT/vmlinuz 2>> $LOGFILE || Die "Cannot copy vmlinuz ($kernelpath) to mondo root ($MONDO_ROOT/vmlinuz). Did you run out of disk space?"
     
    15191545        if [ _"$MONDO_SHARE" != _"" ]; then
    15201546            cp -f $MINDI_TMP/iso/{isolinux.cfg,initrd.img,vmlinuz,isolinux.bin,message.txt,boot*.txt,pxe.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?"
     1547            if [ -e $MINDI_TMP/iso/ldlinux.c32 ]; then
     1548                cp $MINDI_TMP/iso/ldlinux.c32 $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy ldlinux.c32 (from $MINDI_TMP/iso/$LDLINUXC32) to $MONDO_ROOT. Did you run out of disk space?"
     1549            fi
    15211550            if [ $KERNEL_IS_XEN = "yes" ]; then
    15221551                cp -f $MINDI_TMP/iso/{mboot.c32,xen.gz} $MONDO_ROOT 2>> $LOGFILE || Die "Cannot copy Xen core files to ramdisk for boot disk (under $MONDO_ROOT). Did you run out of disk space?"
     
    24322461        possible_xenkernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -i "xen" | sort -u | tr '\n' ' '`
    24332462        noof_xenkernels=`CountItemsIn "$possible_xenkernels"`
    2434         FindMboot32Binary
    24352463    fi
    24362464    possible_kernels=`echo "$possible_kernels" | tr -s ' ' '\n' | grep -vi "xen" | sort -u | tr '\n' ' '`
Note: See TracChangeset for help on using the changeset viewer.