[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting config_directory to prefix at grub launch time

From: Arbiel (gmx)
Subject: Setting config_directory to prefix at grub launch time
Date: Fri, 15 Jan 2016 11:16:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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;
### 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: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]