robertklep/ToggleProxy — pull request #3 by mkoistinen (2013-02-15 13:30:19+00:00)
Title: We need the service name, not the LocalizedDisplayName

/usr/sbin/networksetup requires the unique, user-defined service name, E.g., "Built-in Ethernet" or, in my case "Ethernet (Intel)" which is what I named mine to distinguish it from any other Ethernet interfaces (I have multiple).

Unfortunately, SCNetworkInterfaceGetLocalizedDisplayName is rather poorly documented, but I think it was intended to provide a localized version of "Ethernet" or "Bluetooth". In practice, I don't know if other languages define a different word for these. This would return the same string "Ethernet" (on EN-localized systems) on systems with multiple Ethernet interfaces, so isn't helpful.

Signed-off-by: Martin Koistinen