grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* Setting config_directory to prefix at grub launch time
@ 2016-01-15 10:16 Arbiel (gmx)
  2016-01-15 10:22 ` Andrei Borzenkov
  0 siblings, 1 reply; 7+ messages in thread
From: Arbiel (gmx) @ 2016-01-15 10:16 UTC (permalink / raw)
  To: The development of GNU GRUB

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

In the Ubuntu distributions, there is a /etc/grub.d/41_custom which
creates the following lines in the grub configuration file

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

In the custom.cfg file, I use the source command to insert some private
scripts stored in a ${prefix}/greffons/ directory. However, when the
configuration file has been the target of a configfile command, the
source of my private scripts becomes ${config_file}/greffons/. To be
compatible to all situations, I need to have config_file set to prefix
at the beginning of grub's running, as at this very moment prefix also
is the directory of the configuration file.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]

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

end of thread, other threads:[~2016-01-16  6:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-15 10:16 Setting config_directory to prefix at grub launch time Arbiel (gmx)
2016-01-15 10:22 ` Andrei Borzenkov
2016-01-15 11:32   ` Arbiel (gmx)
2016-01-15 14:18     ` Arbiel (gmx)
2016-01-15 17:12       ` Andrei Borzenkov
2016-01-15 21:40         ` Arbiel (gmx)
2016-01-16  6:25           ` Andrei Borzenkov

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).