#!/bin/bash
if [ `grep memlock /etc/security/limits.conf |grep unlimited |wc -l` -le 0 ]; then 
	echo "*             -   memlock        unlimited" >> /etc/security/limits.conf
	echo "*          soft   memlock        unlimited" >> /etc/security/limits.conf
	echo "*          hard   memlock        unlimited" >> /etc/security/limits.conf
	echo "- Changing max locked memory to unlimited (in /etc/security/limits.conf)"
	echo "  Please log out from the shell and login again in order to update this change "
	echo "  Read more about this topic in the VMA's User Manual"
fi

/sbin/ldconfig
