grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* Add prefix option to grub-mkconfig
@ 2011-08-22 18:02 KESHAV P.R.
  2011-09-16  6:17 ` KESHAV P.R.
  2011-10-13 21:29 ` Jamie Kitson
  0 siblings, 2 replies; 15+ messages in thread
From: KESHAV P.R. @ 2011-08-22 18:02 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

Hi,
     I made a small change to grub-mkconfig.in script to add
GRUB_PREFIX option as an argument so that a single grub-mkconfig can
be used to generate grub.cfg for both /boot/grub (with bios video
modules being loaded) and /boot/efi/efi/grub (uefi video modules
loaded in the config). Please review and apply it. Thanks in advance.

Regards.

Keshav

PS: Patch attached.

[-- Attachment #2: grub-mkconfig-add-prefix-option.patch --]
[-- Type: text/x-patch, Size: 815 bytes --]

diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index e317279..a457b26 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -49,6 +49,7 @@ usage () {
 Usage: $self [OPTION]
 Generate a grub config file
 
+  -p, --prefix=PATH       grub prefix dir [default=/boot/grub]
   -o, --output=FILE       output generated config to FILE [default=stdout]
   -h, --help              print this message and exit
   -v, --version           print the version information and exit
@@ -81,6 +82,11 @@ do
     -v | --version)
 	echo "$self (${PACKAGE_NAME}) ${PACKAGE_VERSION}"
 	exit 0 ;;
+    -p | --prefix)
+	GRUB_PREFIX=`argument $option "$@"`; shift;;
+    --prefix=*)
+	GRUB_PREFIX=`echo "$option" | sed "s,//*,/,g"`
+	;;
     -o | --output)
 	grub_cfg=`argument $option "$@"`; shift;;
     --output=*)

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

end of thread, other threads:[~2011-11-25 13:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 18:02 Add prefix option to grub-mkconfig KESHAV P.R.
2011-09-16  6:17 ` KESHAV P.R.
2011-09-16 17:18   ` Seth Goldberg
2011-10-13 21:29 ` Jamie Kitson
2011-10-26 20:44   ` Keshav P R
2011-10-26 20:48     ` Seth Goldberg
2011-10-26 20:54       ` Keshav P R
2011-10-26 21:04         ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-10-26 21:07           ` Seth Goldberg
2011-10-26 21:14             ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-10-26 21:22               ` Seth Goldberg
2011-10-26 21:42                 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-10-26 22:23                   ` Seth Goldberg
2011-11-22  9:21                     ` Keshav P R
2011-11-25 13:26                       ` 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).