connman: switch to systemd support

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-04 14:25:36 +02:00
parent ae90c12092
commit 14ab577a2d
3 changed files with 7 additions and 56 deletions

View File

@ -1,54 +0,0 @@
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# 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 OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# setup networking
#
# runlevels: openelec, textmode
if [ -f $HOME/.config/debug.connman ]; then
CONNMAN_DEBUG="-d"
fi
# starting loopback device
progress "starting loopback device"
ifconfig lo 127.0.0.1 netmask 255.0.0.0
ifconfig lo up
# creating initial settings file
progress "creating initial connman settings file"
if [ ! -f $CONFIG_CACHE/connman/settings ]; then
cp /usr/share/connman/settings $CONFIG_CACHE/connman
fi
(
# setup hostname
if [ -f $CONFIG_CACHE/hostname ] ; then
progress "Setup hostname"
cat $CONFIG_CACHE/hostname > /proc/sys/kernel/hostname
fi
# starting Connection manager
progress "starting Connection manager"
while true; do
wait_for_dbus
/usr/sbin/connmand -nr $CONNMAN_DEBUG > /dev/null 2>&1
usleep 250000
done
)&

View File

@ -88,8 +88,6 @@ PKG_MAKE_OPTS_TARGET="storagedir=/storage/.cache/connman \
statedir=/run/connman"
post_makeinstall_target() {
rm -rf $INSTALL/lib/systemd
mkdir -p $INSTALL/usr/bin
cp -P client/connmanctl $INSTALL/usr/bin
@ -116,3 +114,10 @@ post_install() {
add_user system x 430 430 "service" "/var/run/connman" "/bin/sh"
add_group system 430
}
post_install() {
enable_service connman.service
if [ "$PPTP_SUPPORT" = yes -o "$OPENVPN_SUPPORT" = yes ]; then
enable_service connman-vpn.service
fi
}