Get rid of some redundancy when sourcing our functions. --- dracut | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dracut b/dracut index 7ba4a09..c333173 100755 --- a/dracut +++ b/dracut @@ -32,17 +32,11 @@ if [[ -f $outfile && ! $force ]]; then exit 1 fi -if [[ $allowlocal && -f ./init ]]; then - . ./dracut-functions - initfile=./init - switchroot=./switch_root - rulesdir=./rules.d -else - . /usr/libexec/dracut/functions - initfile=/usr/libexec/dracut/init - switchroot=/usr/libexec/dracut/switch_root - rulesdir=/usr/libexec/dracut/rules.d -fi +[[ $allowlocal && -f ./init ]] && dsrc="." || dsrc=/usr/libexec/dracut +. $dsrc/dracut-functions +initfile=$dsrc/init +switchroot=$dsrc/switch_root +rulesdir=$dsrc/rules.d initdir=$(mktemp -d -t initramfs.XXXXXX) -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html