]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Get rid of unneeded dirname calls.
authorVictor Lowther <victor.lowther@gmail.com>
Sat, 14 Aug 2010 19:23:24 +0000 (14:23 -0500)
committerHarald Hoyer <harald@redhat.com>
Mon, 23 Aug 2010 09:51:33 +0000 (11:51 +0200)
Use parameter expansion instead.

dracut

diff --git a/dracut b/dracut
index a50e14a28d7ea39c824ab7053d1e51a8d0208c6c..541bfc0bc550f38202ad150299bcf9ef4cb8be22 100755 (executable)
--- 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