Hi Daniel,
Daniel Wagner <wagi(a)monom.org> writes:
Hi Sergey,
On Thu, Jan 30, 2020 at 05:13:04PM +0300, Sergey Organov wrote:
> The question is: how do I get Ethernet service configuration and/or
> re-configure it when there is no cable connected; for example, how do I
> change configuration so that at the next connect of the cable the
> service would use static IPv4 instead of DHCP?
For configuering non-existing networks you need to provision it.
This means you need to write a provisiong file for this. There is no
D-Bus interface for this. See the config-format.txt documentation:
https://git.kernel.org/pub/scm/network/connman/connman.git/tree/doc/confi...
Thanks! I've read it already, but it seemed unnatural to me to be forced
to parse/edit configuration file(s) directly, effectively duplicating
what connmand does anyway, especially as my actual aim is to do it from
an application.
I'll obviously do it, as it happens to be the only available way, but
it's still unclear how does provisioning interoperate with configuration
through D-Bus/connmanctl? My quick test shows that "connmanctl
configure" starts to give (rather undescriptive) errors on provisioned
service:
# connmanctl config ethernet_0018d7677f91_cable ipv4 dhcp
Error ethernet_0018d7677f91_cable: Not supported
#
effectively making provisioning and "connmanctl configure" mutually
exclusive. Is it how it's designed to behave indeed?
Thanks,
Sergey