setup.sh: two minor fixes

Fix typo in checking for mounted hugepages and replace expr with
arithmetic context as expr is returning error when expression is zero.

Change-Id: I2433fa938b3b2e758e1a4267414c10c5a3a5caff
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
This commit is contained in:
Pawel Wodkowski 2016-11-08 15:21:15 +01:00 committed by Daniel Verkamp
parent 1f3d48b22d
commit 77c57e2ff8

View File

@ -69,7 +69,7 @@ function configure_linux {
echo "1" > "/sys/bus/pci/rescan" echo "1" > "/sys/bus/pci/rescan"
if ! mount | grep -q hugetlbs; then if ! mount | grep -q hugetlbfs; then
mkdir -p /mnt/huge mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge mount -t hugetlbfs nodev /mnt/huge
fi fi
@ -80,7 +80,7 @@ function configure_linux {
MEMLOCK_AMNT=`ulimit -l` MEMLOCK_AMNT=`ulimit -l`
if [ "$MEMLOCK_AMNT" != "unlimited" ] ; then if [ "$MEMLOCK_AMNT" != "unlimited" ] ; then
MEMLOCK_MB=`expr $MEMLOCK_AMNT / 1024` MEMLOCK_MB=$(( $MEMLOCK_AMNT / 1024 ))
echo "" echo ""
echo "Current user memlock limit: ${MEMLOCK_MB} MB" echo "Current user memlock limit: ${MEMLOCK_MB} MB"
echo "" echo ""