Small fix (forgot sleep,…)
This commit is contained in:
parent
1e51cd1845
commit
0790dc35bc
|
@ -61,7 +61,7 @@ case $# in
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
printf '%b\n' "Usage :"
|
printf '%b\n' "Usage :"
|
||||||
printf '%b\n' "$(basename $0) PRESEED_FILE_PATH [TEMP_DIR]"
|
printf '%b\n' "$(basename ${0}) PRESEED_FILE_PATH [TEMP_DIR]"
|
||||||
printf '%b\n' "-------"
|
printf '%b\n' "-------"
|
||||||
printf '%b\n' "PRESEED_FILE_PATH : Required"
|
printf '%b\n' "PRESEED_FILE_PATH : Required"
|
||||||
printf '%b\n' "Should be the absolut path to the preseed file you want to add to the ISO."
|
printf '%b\n' "Should be the absolut path to the preseed file you want to add to the ISO."
|
||||||
|
@ -93,18 +93,14 @@ INITRD_GZ_PATH=$(find "${TEMP_ISO_DIR}" -type f \( -path '*xen*' -o -path '*gtk*
|
||||||
## Copy it to a directory
|
## Copy it to a directory
|
||||||
cp -- "${INITRD_GZ_PATH}" "${TEMP_INITRD_DIR}" || exit 2
|
cp -- "${INITRD_GZ_PATH}" "${TEMP_INITRD_DIR}" || exit 2
|
||||||
|
|
||||||
sleep 30
|
|
||||||
|
|
||||||
cd -- "${TEMP_INITRD_DIR}" > /dev/null || exit 2
|
cd -- "${TEMP_INITRD_DIR}" > /dev/null || exit 2
|
||||||
## Uncompress initrd.gz and delete it
|
## Uncompress initrd.gz then delete it
|
||||||
gunzip < initrd.gz | cpio --extract --quiet --make-directories --no-absolute-filenames >> /dev/null
|
gunzip < initrd.gz | cpio --extract --quiet --make-directories --no-absolute-filenames >> /dev/null
|
||||||
rm -f -- initrd.gz
|
rm -f -- initrd.gz
|
||||||
|
|
||||||
## Add preseed file
|
## Add preseed file
|
||||||
cp -- "${PRESEED_FILE}" preseed.cfg || exit 2
|
cp -- "${PRESEED_FILE}" preseed.cfg || exit 2
|
||||||
|
|
||||||
sleep 30
|
|
||||||
|
|
||||||
## Recompress to initrd.gz and move it back to the extracted files for ISO
|
## Recompress to initrd.gz and move it back to the extracted files for ISO
|
||||||
find . -not -name initrd.gz | cpio --format=newc --create --quiet | gzip --best > initrd.gz
|
find . -not -name initrd.gz | cpio --format=newc --create --quiet | gzip --best > initrd.gz
|
||||||
cp -- initrd.gz "${INITRD_GZ_PATH}" || exit 2
|
cp -- initrd.gz "${INITRD_GZ_PATH}" || exit 2
|
||||||
|
@ -127,10 +123,12 @@ xorriso -as mkisofs -o "${DEBIAN_PRESEED_ISO_PATH}" \
|
||||||
-quiet -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
|
-quiet -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
|
||||||
-c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot \
|
-c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot \
|
||||||
-boot-load-size 4 -boot-info-table "${TEMP_ISO_DIR}"
|
-boot-load-size 4 -boot-info-table "${TEMP_ISO_DIR}"
|
||||||
|
|
||||||
|
## Then remove temp iso directory
|
||||||
|
rm -rf -- "${TEMP_ISO_DIR}"
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
printf '%b\n' "The new ISO image is available : ${DEBIAN_PRESEED_ISO_PATH}"
|
printf '%b\n' "The new ISO image is available : ${DEBIAN_PRESEED_ISO_PATH}"
|
||||||
|
|
||||||
#rm -rf -- "${TEMP_ISO_DIR}"
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue