Comments added the problem is understood.
Strategy to solve it (in a more broader way) is documented in
http://www.linuxfromscratch.org/blfs/view/development/chapter07/network.html.

This script excerpt was partially tested with good results, so it's a matter of time to fix it.
Roadmap Update
Fixed variable net_cards
Fixed network card problem, with IFS variable trick.
RoadMap adjust