From: "Arbiel (gmx)" <arbiel.perlacremaz@gmx.fr>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Setting config_directory to prefix at grub launch time
Date: Fri, 15 Jan 2016 11:16:36 +0100 [thread overview]
Message-ID: <5698C704.6050102@gmx.fr> (raw)
[-- 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 --]
next reply other threads:[~2016-01-15 10:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 10:16 Arbiel (gmx) [this message]
2016-01-15 10:22 ` Setting config_directory to prefix at grub launch time 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5698C704.6050102@gmx.fr \
--to=arbiel.perlacremaz@gmx.fr \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.