diff --git a/dracut b/dracut index 5c538b82..c5e9ea77 100755 --- a/dracut +++ b/dracut @@ -108,8 +108,13 @@ export PATH set -x } +[[ $allowlocal && -f "$(readlink -f $(dirname $0))/dracut-functions" ]] && dsrc="$(dirname $0)" || dsrc=$dracutbasedir + # if we were not passed a config file, try the default one -[[ ! -f $conffile ]] && conffile="/etc/dracut.conf" +if [[ ! -f $conffile ]]; then + [[ $allowlocal ]] || conffile="/etc/dracut.conf" + [[ $allowlocal ]] && conffile="$dracutbasedir/dracut.conf" +fi # source our config file [[ -f $conffile ]] && . "$conffile" @@ -134,8 +139,6 @@ fw_dir=${fw_dir//:/ } [[ $hostonly = yes ]] && hostonly="-h" -[[ $allowlocal && -f "$(readlink -f $(dirname $0))/dracut-functions" ]] && dsrc="$(dirname $0)" || dsrc=$dracutbasedir - if [[ -f $dsrc/dracut-functions ]]; then . $dsrc/dracut-functions else