autoswitching routes in debian/bash