I am using Ubuntu Precise, but the server one, not the desktop one. Maybe that is the cause.
On this Ubuntu Precise (server), the ifconfig command is at /sbin/ifconfig
I though adding "sudo" would help in my case, and at the same time would not harm on the usual Ubuntu desktop case.
Also note sudo if already being used on other parts of that script.
Regards