From: Victor Lowther Date: Sat, 14 Aug 2010 19:23:24 +0000 (-0500) Subject: Get rid of unneeded dirname calls. X-Git-Tag: 008~167 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e4fee3d5a7a185f7da4814197444699d7978ede;p=thirdparty%2Fdracut.git Get rid of unneeded dirname calls. Use parameter expansion instead. --- 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