The state of the switch shouldn't be too hard to query via a hotplug script, once you have exposed it via its DTS (didn't check) - acting on that information the way you seem to envision would be a different question (OpenWrt isn't as much of a walled garden than your run off the mill vendor firmware, it can't just stomp over existing configurations without very nasty side effects, as you don't know what the user has installed).