connman: allow user editable main.conf

In recent months I have seen a number of cases where users need to
change ‘prefer ethernet’ to ‘prefer wifi’ or where users are trying to
enable tethering for ethernet or are running other daemons that add
network interfaces that should not be auto-managed by comman. All of
these require user editing of main.conf so this change moves main.conf
to /storage where it can be tweaked under-the-hood if needed.
This commit is contained in:
Christian Hewitt 2014-05-07 10:05:51 +04:00 committed by Stephan Raue
parent f87f66f043
commit 871cddef86
2 changed files with 8 additions and 2 deletions

View File

@ -22,3 +22,10 @@
mkdir -p /storage/.cache/connman
cp /usr/share/connman/settings /storage/.cache/connman
fi
# set variable for connman main.conf location
if [ -f /storage/.config/connman_main.conf ]; then
export CONNMAN_MAIN="--config=/storage/.config/connman_main.conf"
else
export CONNMAN_MAIN="--config=/etc/connman/main.conf"
fi

View File

@ -11,8 +11,7 @@ Type=dbus
BusName=net.connman
Restart=on-failure
EnvironmentFile=-/run/openelec/debug/connman.conf
ExecStartPre=/usr/lib/connman/connman-setup
ExecStart=/usr/sbin/connmand -nr $CONNMAN_DEBUG
ExecStart=/bin/sh -c ". /usr/lib/connman/connman-setup; exec /usr/sbin/connmand -nr $CONNMAN_MAIN $CONNMAN_DEBUG"
# send SIGKILL on stop to keep ip configuration
KillSignal=SIGKILL
StandardOutput=null