mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
connman: use connmand-wait-online and rework service dependencies
This commit is contained in:
parent
0ac03dde6c
commit
356f21bfa3
@ -76,7 +76,6 @@ post_makeinstall_target() {
|
|||||||
|
|
||||||
mkdir -p $INSTALL/usr/bin
|
mkdir -p $INSTALL/usr/bin
|
||||||
cp -P client/connmanctl $INSTALL/usr/bin
|
cp -P client/connmanctl $INSTALL/usr/bin
|
||||||
cp -P $PKG_DIR/scripts/cm-online $INSTALL/usr/bin
|
|
||||||
|
|
||||||
mkdir -p $INSTALL/usr/lib/connman
|
mkdir -p $INSTALL/usr/lib/connman
|
||||||
cp -P $PKG_DIR/scripts/connman-setup $INSTALL/usr/lib/connman
|
cp -P $PKG_DIR/scripts/connman-setup $INSTALL/usr/lib/connman
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
################################################################################
|
|
||||||
# This file is part of OpenELEC - http://www.openelec.tv
|
|
||||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
|
||||||
#
|
|
||||||
# OpenELEC 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 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# OpenELEC 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. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Wait for the network to come up and exit after timeout or if network is online
|
|
||||||
|
|
||||||
# default 30sec
|
|
||||||
[ ! -z $1 ] && TIMEOUT=$1 || TIMEOUT=30
|
|
||||||
|
|
||||||
for i in $(seq 1 $TIMEOUT) ; do
|
|
||||||
STATUS=$(ifconfig | sed -e '/inet addr:/!d' -e '/127.0.0.1/d' |wc -l)
|
|
||||||
[ "$STATUS" -gt 0 ] && break
|
|
||||||
usleep 1000000
|
|
||||||
done
|
|
@ -1,13 +1,17 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Connection Manager Wait Online
|
Description=Wait for network to be configured by ConnMan
|
||||||
Requisite=connman.service
|
Requisite=connman.service
|
||||||
After=connman.service
|
After=connman.service
|
||||||
|
Before=network-online.target
|
||||||
|
DefaultDependencies=no
|
||||||
|
Conflicts=shutdown.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStartPre=/bin/sh -c 'echo "waiting on Network to come online ..."'
|
ExecStartPre=/bin/sh -c 'echo "waiting on Network to come online ..."'
|
||||||
ExecStart=/usr/bin/cm-online 30
|
ExecStart=/usr/sbin/connmand-wait-online --timeout=30
|
||||||
StandardOutput=tty
|
StandardOutput=tty
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=network-online.target
|
||||||
|
Loading…
x
Reference in New Issue
Block a user