relative order of /etc/dracut.conf and /etc/dracut.conf.d
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/[email protected]>
This provides the natural way to ship defalts in dracut.conf while allow local system customization in dracut.conf.d.
---
dracut | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
dracut +4 -3
@@ -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
A message that is not in the archive (sent off-list or not yet received): 201003060754.08574.arvidjaar-JGs/[email protected]
Quoted 6 lines · Andrey Borzenkov
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.