
check_port_look()
{
	PORT=$1

	pmadm -l 2>/dev/null | grep -s -c $PORT
}

check_port()
{
	PORT=$1

	if [ `check_port_look /dev/term/$PORT` -ne 0 ]; then
		message "Sorry, port $PORT is in use - you must make this"
		message "available and restart"
		terminate port $PORT is already in use
	fi
}
