mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
26 lines
807 B
Bash
Executable File
26 lines
807 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
|
|
|
# creating initial settings file
|
|
if [ ! -f /storage/.cache/connman/settings ]; then
|
|
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
|
|
|
|
# switch resolv.conf management to connman and use current contents
|
|
# as a fallback
|
|
if [ -f /run/libreelec/resolv.conf ]; then
|
|
cat /run/libreelec/resolv.conf >/run/connman/resolv.conf
|
|
fi
|
|
rm -f /run/libreelec/resolv.conf
|
|
ln -s /run/connman/resolv.conf /run/libreelec/resolv.conf
|