On Mon, Mar 02, 2020 at 05:33:46PM +1100, JH wrote:
I made pre-configure files settings, cellar.config, wifi.config in
/var/lib/connman/, but connman overwrote the
/var/lib/connman/settings. I have recently changed rootfs to RO, all
configure files in /var/lib/connman are moved to a RW partition and I
made symlinks in /var/lib/connman/ to point configure files in RW,
that works fine except the /var/lib/connman/settings, connman removed
symlink of /var/lib/connman/settings->/data/connman/settings, replace
it by a file connman overwrote:
$ ls-l /var/lib/connman
# ls -l /var/lib/connman
lrwxrwxrwx 1 root root 29 Feb 27 04:23
cellular.config -> /data/connman/cellular.config
drwx------ 2 root root 80 Feb 27 04:24
-rw------- 1 root root 177 Feb 27 04:23 settings
lrwxrwxrwx 1 root root 25 Feb 27 04:23 wifi.config
Can I stop connman to overwrite the /var/lib/connman/settings?
The filename is a misnomer. ConnMan uses this file for storing the
state. That means ConnMan is reading it at startup and during runtime
it will be writing when the state changes (e.g. a technology is
enabled). This file is under control by ConnMan.
This means you can only modify this file when ConnMan is not running.
If I understood you correctly, you want to have a default
configuration at deployment time, correct?
One way how we could fix this, is by introducing a default settings
file which is used whenever the /var/lib/connman/settings file doesn't
exist. I suppose such a file would be located under
/etc/connman/settings. If /etc/connman/settings doesn't exist the
built in defaults would be used.