grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* grub-mkstandalone fixes
@ 2011-12-04  9:42 Keshav P R
  2011-12-04  9:47 ` Keshav P R
  0 siblings, 1 reply; 6+ messages in thread
From: Keshav P R @ 2011-12-04  9:42 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 271 bytes --]

Hi,
    It seems like grub-mkstandalone was copied directly from grub-mkrescue
without checking the options. Also there is no way to specify a grub.cfg to
be copied as (memdisk)/boot/grub/grub.cfg . The attached patch fixes all of
this. Pleas apply it.

Regards.

Keshav

[-- Attachment #1.2: Type: text/html, Size: 298 bytes --]

[-- Attachment #2: grub-mkstandalone-fixes.patch --]
[-- Type: text/x-patch, Size: 2054 bytes --]

diff --git a/util/grub-mkstandalone.in b/util/grub-mkstandalone.in
index e140ecc..15af6ad 100644
--- a/util/grub-mkstandalone.in
+++ b/util/grub-mkstandalone.in
@@ -86,7 +86,7 @@ do
 	exit 0 ;;
 
     --modules)
-        modules=`argument $option "$@"`; shift ;;
+	modules=`argument $option "$@"`; shift ;;
     --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
 
@@ -95,10 +95,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 +113,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 +167,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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-22 12:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-04  9:42 grub-mkstandalone fixes Keshav P R
2011-12-04  9:47 ` Keshav P R
2011-12-04  9:59   ` Keshav P R
2011-12-14 19:49     ` Keshav P R
2011-12-18 21:23       ` Keshav P R
2011-12-22 12:07         ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).