diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in index e140ecc..3a77870 100644 --- a/util/grub-mkstandalone.in +++ b/util/grub-mkstandalone.in @@ -31,7 +31,7 @@ pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst self=`basename $0` -source_dirrectory= +source_directory= compression=auto format= grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}` @@ -51,6 +51,7 @@ Make GRUB rescue image. -O, --format=FORMAT generate an image in format available formats: %s -C, --compression=(xz|none|auto) choose the compression to use + -c, --config=FILE use specified file as grub.cfg --modules=MODULES pre-load specified modules MODULES --grub-mkimage=FILE use FILE as grub-mkimage @@ -86,7 +87,7 @@ do exit 0 ;; --modules) - modules=`argument $option "$@"`; shift ;; + modules=`argument $option "$@"`; shift ;; --modules=*) modules=`echo "$option" | sed 's/--modules=//'` ;; @@ -95,10 +96,15 @@ do --output=*) output_image=`echo "$option" | sed 's/--output=//'` ;; + -c | --config) + config_file=`argument $option "$@"`; shift ;; + --config=*) + config_file=`echo "$option" | sed 's/--config=//'` ;; + --directory | -d) - source_directory=`argument $option "$@"`; shift ;; + source_directory=`argument $option "$@"`; shift ;; --directory=*) - source_directory=`echo "$option" | sed 's/--rom-directory=//'` ;; + source_directory=`echo "$option" | sed 's/--directory=//'` ;; --grub-mkimage) grub_mkimage=`argument $option "$@"`; shift ;; @@ -108,12 +114,12 @@ do --compression | -C) compression=`argument $option "$@"`; shift ;; --compression=*) - compression=`echo "${option}/" | sed 's/--xorriso=//'` ;; + compression=`echo "${option}/" | sed 's/--compression=//'` ;; --format | -O) format=`argument $option "$@"`; shift ;; --format=*) - format=`echo "${option}/" | sed 's/--xorriso=//'` ;; + format=`echo "${option}/" | sed 's/--format=//'` ;; *) source="${source} ${option} $@"; break ;; @@ -162,12 +168,17 @@ for file in "${source_directory}/"*.mod "${source_directory}/"efiemu32.o "${sour cp -f "$file" "${memdisk_dir}"/boot/grub/ fi done + for file in ${pkglib_DATA}; do if test -f "${source_directory}/${file}"; then cp -f "${source_directory}/${file}" "${memdisk_dir}"/boot/grub/ fi done +if test -f "${config_file}"; then + cp -f "${config_file}" "${memdisk_dir}"/boot/grub/grub.cfg +fi + mkdir -p "${memdisk_dir}"/boot/grub/locale for file in "${source_directory}"/po/*.mo; do if test -f "$file"; then