I've a Debian system without UI, with a GPRS modem attached to it. Now, this system is connected with ethernet through a standard cable. I want to obtain a configuration that allows the computer to access internet via ethernet, if an ethernet cable is connected, otherwise use the GPRS to do so. Pratically speaking, I want the eth0 interface to be the preferable interface if it is on, ppp (only) if former isn't mounted.
How to obtain an easy /etc/network/interfaces configuration to achieve this?