I beg to differ from my learned friends. Its a boundary case.
The term in the contract that the person will not deal withe the competitors for a period of two years is an unreasonable term in contravention to Article 19(G) of the Constituion which confers the right to freedom to practice any profession, or to carry on any occupation, trade or business.
To enforce the clause of restricting business with the competetors, the company will have to prove that during the contract period, important trade-secrets, technical know-how or othe proprietory information was passed on to the person and his now dealing with the competetors may lead to financial/ market loss to the company.
In case the company is not able to prove that conclusively and as the person says that its the only source of his livelihood, the courts will strike down the condition, I feel.