His solution is pretty clever, but I’d point out a couple of quibbles: First, I’d probably use LaunchDaemons, not LaunchAgents, for this so it’d be up before I logged in. I would NOT use /System/Library either way; this is a local change and belongs in /Library. Also, I put the script in /usr/local/bin.

The gimmick is that the system can run a script any time the configuration changes, and the script can then, say, evaluate the current state of the wifi and ethernet connections, and select accordingly. This means that simply plugging or unplugging the Ethernet cable causes a toggle, which gets the result I want.