[PATCH 02/16] Get rid of unneeded dirname calls.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use parameter expansion instead.

---
 dracut |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dracut b/dracut
index a50e14a..541bfc0 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
-- 
1.7.2.1

--
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


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux