From 77c57e2ff86a0cd958d4d8ed6ecf37d279e6e084 Mon Sep 17 00:00:00 2001 From: Pawel Wodkowski Date: Tue, 8 Nov 2016 15:21:15 +0100 Subject: [PATCH] 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 --- scripts/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 5f2f732f7..1d754bb07 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -69,7 +69,7 @@ function configure_linux { echo "1" > "/sys/bus/pci/rescan" - if ! mount | grep -q hugetlbs; then + if ! mount | grep -q hugetlbfs; then mkdir -p /mnt/huge mount -t hugetlbfs nodev /mnt/huge fi @@ -80,7 +80,7 @@ function configure_linux { MEMLOCK_AMNT=`ulimit -l` if [ "$MEMLOCK_AMNT" != "unlimited" ] ; then - MEMLOCK_MB=`expr $MEMLOCK_AMNT / 1024` + MEMLOCK_MB=$(( $MEMLOCK_AMNT / 1024 )) echo "" echo "Current user memlock limit: ${MEMLOCK_MB} MB" echo ""