Hi,
On Fri, 2014-08-29 at 15:01 +0200, Benjamin Block wrote:
> I just wanted to ask, if it is possible to configure connman in a way
> that I can switch to specific settings depending on the location I am at
> (no problem if I have to trigger this switch) and maybe fall back to
> dhcpcd or other stuff like it, if I get to a new location.
>
> Thing is, I use my laptop in 4 different locations, each location has
> its own set of settings. 3 of them require me to use a specific ip, 1
> even a specific firewall-setting (iptables). I'd like to configure one
> "profile" for each of those location (state the config for each of my
> devices [eth0, wlan0, wwan0]) and then let connman switch between these
> profiles - likely by using a connmanctl-command. If I am at a new
> location, then I'd fall back to all the fancy automation.
ConnMan does not do any additional profile based configuration, so that
has to be added by an external program.
The perhaps easiest way of solving this would be a separate tool, which
moves (copies) required ConnMan .config files to and
from /var/lib/connman. The ownership of that directory should be set
properly, as the current root.root user and owner is merely just a
placeholder for the tool developer or distro maintainer to update when
needed.
The easiest solution might be to store all .config files relevant to a
certain "profile" in a specific directory, e.g.
'/var/lib/<name-of-tool>/profiles/<name-of-profile>/*.config'. Based on
user selection the .config files based on the previous profile are to be
removed with the .config files for the new profile added
to /var/lib/connman. It is a good idea to remove only the previous
profile specific .config files from /var/lib/connman and not every file,
as some other program(s) or the user him/herself may have added
specific .config files for some other purpose than the profiles handled
by this tool.
> Is that possible and if yes, how? I was locking at the documentation
> coming with connman, but they seem quite outdated in places (for
> example, I was reading `config-format.txt` and tried to create such a
> config at `/var/log/connman/work.conf`; but this was ignored
'/var/lib/connman/work.config' is the correct name and location for this
file.
> completely). Also I wonder how to tell connman how to ignore some of my
> network-devices (I tried the command line option and the option
> `/etc/connman/main.cfg`), it seems to ignore me quite good on this.
And that would be '/etc/connman/main.conf'.
Cheers,
Patrik
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman