From: Harald Hoyer Date: Fri, 9 Oct 2009 11:15:32 +0000 (+0200) Subject: dracut: if called with "-l" read only local dracut.conf X-Git-Tag: 003~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42c719474e2ae158ad0f5d299f878077d1cbe878;p=platform%2Fupstream%2Fdracut.git dracut: if called with "-l" read only local dracut.conf --- diff --git a/dracut b/dracut index 5c538b8..c5e9ea7 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