From 6b4c82f4657bdb56e6b7a56651d6d4bb91a35b8f Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 26 Jun 2014 13:29:32 +0200 Subject: initial commit for Enea Linux 4.0 Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau --- .../connman/files/connman-init-settings.sh | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100755 meta-eca/recipes-connectivity/connman/files/connman-init-settings.sh (limited to 'meta-eca/recipes-connectivity/connman/files/connman-init-settings.sh') diff --git a/meta-eca/recipes-connectivity/connman/files/connman-init-settings.sh b/meta-eca/recipes-connectivity/connman/files/connman-init-settings.sh new file mode 100755 index 0000000..9b4f040 --- /dev/null +++ b/meta-eca/recipes-connectivity/connman/files/connman-init-settings.sh @@ -0,0 +1,96 @@ +#!/bin/sh +# +# Connection Manager Init Service +# +# Copyright (C) 2012 Intel Corporation. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +CONNMAN_DIR=/var/lib/connman +CONNMAN_SETTINGS=$CONNMAN_DIR/settings + +if [ -s $CONNMAN_SETTINGS ]; then + exit 0 +fi + +if [ ! -d $CONNMAN_DIR ]; then + mkdir -p $CONNMAN_DIR +fi + +TETHERING="$1" +TETHERING_AP_PASSPHRASE="$2" +TETHERING_AP_SSID="$3" + +if [ -z "$TETHERING" ]; then + TETHERING="true" +fi + +# Create main.conf with those values that we need +MAINCONF=/etc/connman/main.conf +cat > $MAINCONF < $CONNMAN_SETTINGS <