summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-01-12 00:30:45 +0100
committerThomas Bächler <thomas@archlinux.org>2010-01-12 00:32:37 +0100
commit4b482b42467b43fb43755a8c5200d81063f9d80d (patch)
tree0297567bf7fff2d9d3c71de2a46d464e20e8edd8 /mkinitcpio
parenta5b517dba551af7fd902464a5d866e2d5ce03508 (diff)
downloadmkinitcpio-4b482b42467b43fb43755a8c5200d81063f9d80d.tar.gz
mkinitcpio-4b482b42467b43fb43755a8c5200d81063f9d80d.tar.xz
Do not append a trailing /, remove it (fixed FS#17793)
The comment said it was appending a trailing /, but it was actually removed Recent fixes adjusted the code to do what the comment says, which is wrong here. This fixes the code and the comment.
Diffstat (limited to 'mkinitcpio')
-rwxr-xr-xmkinitcpio6
1 files changed, 2 insertions, 4 deletions
diff --git a/mkinitcpio b/mkinitcpio
index e331da2..91dac25 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -175,10 +175,8 @@ if [ -n "${PRESET}" ]; then
fi
fi
-# append a trailing / if needed
-if [ "${BASEDIR}" = "${BASEDIR%/}" ]; then
- BASEDIR="${BASEDIR}/"
-fi
+# remove trailing / from BASEDIR
+BASEDIR="${BASEDIR%/}"
MODULEDIR="${BASEDIR}/lib/modules/${KERNELVERSION}"