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@xxxxxxx> 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@xxxxxxx> --- 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:
signature.asc
Description: This is a digitally signed message part.