switch_net.sh: Fix parameter processing