* util/grub-mkrescue.in: Support --xorriso argument.

This commit is contained in:
Thomas Schmitt 2010-06-12 13:54:35 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent 25c56d2928
commit a608597318
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2010-06-12 Thomas Schmitt <scdbackup@gmx.net>
* util/grub-mkrescue.in: Support --xorriso argument.
2010-06-12 Vladimir Serbinenko <phcoder@gmail.com> 2010-06-12 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkrescue.in: Use -graft-points instead of -pathspecs. * util/grub-mkrescue.in: Use -graft-points instead of -pathspecs.

View file

@ -42,6 +42,8 @@ rom_directory=
override_dir= override_dir=
grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}` grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
xorriso=xorriso
# Usage: usage # Usage: usage
# Print the usage. # Print the usage.
usage () { usage () {
@ -54,6 +56,7 @@ Make GRUB rescue image.
--output=FILE save output in FILE [required] --output=FILE save output in FILE [required]
--modules=MODULES pre-load specified modules MODULES --modules=MODULES pre-load specified modules MODULES
--rom-directory=DIR save rom images in DIR [optional] --rom-directory=DIR save rom images in DIR [optional]
--xorriso=FILE use FILE as xorriso [optional]
--grub-mkimage=FILE use FILE as grub-mkimage --grub-mkimage=FILE use FILE as grub-mkimage
$self generates a bootable rescue image with specified source files or directories. $self generates a bootable rescue image with specified source files or directories.
@ -85,6 +88,8 @@ for option in "$@"; do
;; ;;
--grub-mkimage=*) --grub-mkimage=*)
grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;; grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
--xorriso=*)
xorriso=`echo "${option}/" | sed 's/--xorriso=//'` ;;
-*) -*)
echo "Unrecognized option \`$option'" 1>&2 echo "Unrecognized option \`$option'" 1>&2
usage usage
@ -269,7 +274,7 @@ if [ -e "${iso9660_dir}/boot/coreboot.elf" ] && [ -d "${rom_directory}" ]; then
fi fi
# build iso image # build iso image
xorriso -as mkisofs -graft-points ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} --sort-weight 0 / --sort-weight 1 /boot ${source} "${xorriso}" -as mkisofs -graft-points ${grub_mkisofs_arguments} --protective-msdos-label -o ${output_image} -r ${iso9660_dir} --sort-weight 0 / --sort-weight 1 /boot ${source}
rm -rf ${iso9660_dir} rm -rf ${iso9660_dir}
rm -f ${embed_img} rm -f ${embed_img}