2018-05-21 12:41:52 +00:00
|
|
|
#!/bin/bash
|
|
|
|
source $(dirname $0)/defaults.conf
|
|
|
|
source ${WORKDIR}/mklive.conf
|
|
|
|
source $(dirname $0)/functions.sh
|
|
|
|
source $(dirname $0)/menufunction.sh
|
|
|
|
|
2018-05-31 11:01:20 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
einfo "Creating ISO"
|
2018-05-21 12:41:52 +00:00
|
|
|
|
|
|
|
ISOLINUX_MODULES="ldlinux.c32 libmenu.c32 menu.c32"
|
|
|
|
ISOLINUX_BIN="/usr/lib/ISOLINUX/isolinux.bin"
|
|
|
|
|
2018-05-31 11:01:20 +00:00
|
|
|
checkstage live || eexit "Previous stage (live) was not finished"
|
2018-05-21 12:41:52 +00:00
|
|
|
|
|
|
|
startstage iso
|
|
|
|
|
|
|
|
ISODIR=${WORKDIR}/ISO
|
|
|
|
requiredir $ISODIR
|
|
|
|
requiredir $ISODIR/isolinux
|
|
|
|
[ -L $ISODIR/live ] || ln -s ../LIVE $ISODIR/live
|
|
|
|
|
|
|
|
#copy isolinux.bin
|
|
|
|
cp ${ISOLINUX_BIN} $ISODIR/isolinux/
|
|
|
|
|
|
|
|
#create isolinux.conf
|
|
|
|
menuhead > $ISODIR/isolinux/isolinux.cfg
|
|
|
|
menulivehead >> $ISODIR/isolinux/isolinux.cfg
|
|
|
|
menulive >> $ISODIR/isolinux/isolinux.cfg
|
|
|
|
|
|
|
|
if [ "$ISO_INCLUDE_UBUNTU_INSTALLER" == "true" ] || [ "$ISO_INCLUDE_DEBIAN_INSTALLER" == "true" ]; then
|
|
|
|
menuinstallerhead >> $ISODIR/isolinux/isolinux.cfg
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$ISO_INCLUDE_UBUNTU_INSTALLER" == "true" ]; then
|
|
|
|
menuinstaller ubuntu >> $ISODIR/isolinux/isolinux.cfg
|
|
|
|
[ -L $ISODIR/ubuntu-installer ] || ln -s ../INSTALLER/ubuntu-installer $ISODIR/ubuntu-installer
|
|
|
|
fi
|
|
|
|
|
2018-05-22 19:41:24 +00:00
|
|
|
if [ "$PXE_INCLUDE_DEBIAN_INSTALLER" == "true" ]; then
|
2018-05-31 11:01:20 +00:00
|
|
|
menuinstaller debian >> $ISODIR/isolinux/isolinux.cfg
|
2018-05-22 19:41:24 +00:00
|
|
|
[ -L $PXEDIR/debian-installer ] || ln -s ../INSTALLER/debian-installer $PXEDIR/debian-installer
|
|
|
|
fi
|
2018-05-21 12:41:52 +00:00
|
|
|
|
|
|
|
if [ "$ISO_INCLUDE_HDT" == "true" ] || [ "$ISO_INCLUDE_MEMTEST" == "true" ]; then
|
|
|
|
menuhwhead >> $ISODIR/isolinux/isolinux.cfg
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$ISO_INCLUDE_HDT" == "true" ]; then
|
|
|
|
ISOLINUX_MODULES="${ISOLINUX_MODULES} hdt.c32 libutil.c32 libgpl.c32 libcom32.c32"
|
|
|
|
menuhwhdt >> $ISODIR/isolinux/isolinux.cfg
|
|
|
|
[ -e /usr/share/misc/pci.ids ] && cp /usr/share/misc/pci.ids $ISODIR/isolinux/
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$ISO_INCLUDE_MEMTEST" == "true" ]; then
|
|
|
|
cp $MEMTEST_BIN $ISODIR/memtest
|
|
|
|
menuhwmemtest >> $ISODIR/isolinux/isolinux.cfg
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#copy all modules
|
|
|
|
for m in $ISOLINUX_MODULES
|
|
|
|
do
|
|
|
|
cp ${SYSLINUX_MODULESDIR}/$m $ISODIR/isolinux/
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#create isofile
|
|
|
|
mkisofs -f -boot-info-table -boot-load-size 4 -no-emul-boot -o ${ISO_FILENAME}.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -l -R -J $ISODIR
|
|
|
|
|
|
|
|
endstage iso
|
2018-05-31 11:01:20 +00:00
|
|
|
eok "ISO done"
|