From 0e4fee3d5a7a185f7da4814197444699d7978ede Mon Sep 17 00:00:00 2001 From: Victor Lowther Date: Sat, 14 Aug 2010 14:23:24 -0500 Subject: [PATCH] Get rid of unneeded dirname calls. Use parameter expansion instead. --- dracut | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut b/dracut index a50e14a28..541bfc0bc 100755 --- a/dracut +++ b/dracut @@ -127,7 +127,7 @@ export PATH [[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut -[[ $allowlocal && -f "$(readlink -f $(dirname $0))/dracut-functions" ]] && dracutbasedir="$(dirname $0)" +[[ $allowlocal && -f "$(readlink -f ${0%/*})/dracut-functions" ]] && dracutbasedir="${0%/*}" # if we were not passed a config file, try the default one if [[ ! -f $conffile ]]; then -- 2.47.3