Commit 77c57e2f authored by Pawel Wodkowski's avatar Pawel Wodkowski Committed by Daniel Verkamp
Browse files

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: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
parent 1f3d48b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 ""