* relative order of /etc/dracut.conf and /etc/dracut.conf.d
@ 2010-03-06 4:54 Andrey Borzenkov
[not found] ` <201003060754.08574.arvidjaar-JGs/UdohzUI@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Borzenkov @ 2010-03-06 4:54 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1626 bytes --]
Currently dracut.conf is sourced after dracut.conf.d. Is it intentional?
I'd actually expect the opposite - dracut.conf used for distribution defaults,
dracut.conf.d for local system adjustments with command line options overruling
them all.
--
Subject: [PATCH] Source dracut.conf.d/* after dracut.conf
From: Andrey Borzenkov <arvidjaar-JGs/UdohzUI@public.gmane.org>
This provides the natural way to ship defalts in dracut.conf while
allow local system customization in dracut.conf.d.
Signed-off-by: Andrey Borzenkov <arvidjaar-JGs/UdohzUI@public.gmane.org>
---
dracut | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dracut b/dracut
index b16e205..3f3c3e6 100755
--- a/dracut
+++ b/dracut
@@ -123,11 +123,15 @@ if [[ ! -f $conffile ]]; then
[[ $allowlocal ]] && conffile="$dracutbasedir/dracut.conf"
fi
+# if we were not passed a config dir, try the default one
if [[ ! -d $confdir ]]; then
[[ $allowlocal ]] || confdir="/etc/dracut.conf.d"
[[ $allowlocal ]] && confdir="$dracutbasedir/dracut.conf.d"
fi
+# source our config file
+[[ -f $conffile ]] && . "$conffile"
+
# source our config dir
if [ "$confdir" ] && [ -d "$confdir" ]; then
for f in "$confdir"/*.conf; do
@@ -135,9 +139,6 @@ if [ "$confdir" ] && [ -d "$confdir" ]; then
done
fi
-# source our config file
-[[ -f $conffile ]] && . "$conffile"
-
# these options override the stuff in the config file
[[ $dracutmodules_l ]] && dracutmodules=$dracutmodules_l
[[ $omit_dracutmodules_l ]] && omit_dracutmodules=$omit_dracutmodules_l
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: relative order of /etc/dracut.conf and /etc/dracut.conf.d
[not found] ` <201003060754.08574.arvidjaar-JGs/UdohzUI@public.gmane.org>
@ 2010-03-17 10:58 ` Harald Hoyer
0 siblings, 0 replies; 2+ messages in thread
From: Harald Hoyer @ 2010-03-17 10:58 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 03/06/2010 05:54 AM, Andrey Borzenkov wrote:
> Currently dracut.conf is sourced after dracut.conf.d. Is it intentional?
>
> I'd actually expect the opposite - dracut.conf used for distribution defaults,
> dracut.conf.d for local system adjustments with command line options overruling
> them all.
>
err.. I would see dracut.conf.d as a place for packages to drop their files in,
so I would like to have dracut.conf as the last instance to override any
settings imposed by other packages.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-17 10:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-06 4:54 relative order of /etc/dracut.conf and /etc/dracut.conf.d Andrey Borzenkov
[not found] ` <201003060754.08574.arvidjaar-JGs/UdohzUI@public.gmane.org>
2010-03-17 10:58 ` Harald Hoyer
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.