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

Bug#799359: live-config: Variables in config files not exported



Control: tags -1 + patch

Hi again,

I'd suggest setting the allexport shell option for reading the
configuration files to address the problem. I've added a patch against
the debian-next branch of the live-config repository.

I've also added a slight modification to the man page as a separate
patch, because the configuration files actually do need the ».conf«
suffix.

Regards
Lukas Schwaighofer
From 09ccaf34b1d30f95f324e3685a9400cd8db7034b Mon Sep 17 00:00:00 2001
From: Lukas Schwaighofer <lukas@schwaighofer.name>
Date: Wed, 23 Sep 2015 13:04:41 +0200
Subject: config files actually require the .config suffix

---
 manpages/en/live-config.7 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/manpages/en/live-config.7 b/manpages/en/live-config.7
index ee53b0f..1cd1041 100644
--- a/manpages/en/live-config.7
+++ b/manpages/en/live-config.7
@@ -112,7 +112,7 @@ Enables debug output in live\-config.
 .PP
 Configuration files can be placed either in the root filesystem itself (/etc/live/config.conf, /etc/live/config.conf.d/*.conf), or on the live media (live/config.conf, live/config.conf.d/*.conf). If both places are used for a certain option, the ones from the live media take precedence over the ones from the root filesystem.
 .PP
-Although the configuration files placed in the configuration directories do not require a particular name or suffix, it is suggested for consistency reasons to either use 'vendor.conf' or 'project.conf' as a naming scheme (whereas 'vendor' or 'project' is replaced with the actual name, resulting in a filename like 'progress\-linux.conf').
+Although the configuration files placed in the configuration directories do not require a particular name, it is suggested for consistency reasons to either use 'vendor.conf' or 'project.conf' as a naming scheme (whereas 'vendor' or 'project' is replaced with the actual name, resulting in a filename like 'progress\-linux.conf').
 .PP
 The actual content of the configuration files consists of one or more of the following variables.
 
-- 
2.1.4

From ba6c618bbd6a18eae826471394c6bbe50fad8a1f Mon Sep 17 00:00:00 2001
From: Lukas Schwaighofer <lukas@schwaighofer.name>
Date: Wed, 23 Sep 2015 13:05:03 +0200
Subject: export variables set in config files

if the variables are not exported, they are not available in the
components
---
 frontend/live-config | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/frontend/live-config b/frontend/live-config
index 8c70c71..f934f26 100755
--- a/frontend/live-config
+++ b/frontend/live-config
@@ -41,6 +41,7 @@ export _IP_SEPARATOR _PROC_OPTIONS
 _COMPONENTS="$(ls /lib/live/config/*)"
 
 # Reading configuration files from filesystem and live-media
+set -o allexport
 for _FILE in /etc/live/config.conf /etc/live/config.conf.d/*.conf \
 	     /lib/live/mount/medium/live/config.conf /lib/live/mount/medium/live/config.conf.d/*.conf
 do
@@ -49,6 +50,7 @@ do
 		. "${_FILE}"
 	fi
 done
+set +o allexport
 
 Cmdline ()
 {
-- 
2.1.4

Attachment: pgpe2cIqGZa0y.pgp
Description: OpenPGP digital signature


Reply to: