From: Andrey Borzenkov <arvidjaar-JGs/UdohzUI@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: relative order of /etc/dracut.conf and /etc/dracut.conf.d
Date: Sat, 6 Mar 2010 07:54:08 +0300 [thread overview]
Message-ID: <201003060754.08574.arvidjaar@mail.ru> (raw)
[-- 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 --]
next reply other threads:[~2010-03-06 4:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 4:54 Andrey Borzenkov [this message]
[not found] ` <201003060754.08574.arvidjaar-JGs/UdohzUI@public.gmane.org>
2010-03-17 10:58 ` relative order of /etc/dracut.conf and /etc/dracut.conf.d Harald Hoyer
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=201003060754.08574.arvidjaar@mail.ru \
--to=arvidjaar-jgs/udohzui@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.