mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 15:07:49 +00:00
connman: start init scripts on RUNLEVEL=boot
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
e78b76d1e2
commit
0946759631
@ -22,28 +22,30 @@
|
|||||||
#
|
#
|
||||||
# runlevels: openelec, installer, textmode
|
# runlevels: openelec, installer, textmode
|
||||||
|
|
||||||
if [ -f /var/config/settings.conf ]; then
|
case $RUNLEVEL in
|
||||||
|
boot)
|
||||||
|
if [ -f /var/config/settings.conf ]; then
|
||||||
. /var/config/settings.conf
|
. /var/config/settings.conf
|
||||||
|
|
||||||
# save original interface names (eth0, eth1)
|
# save original interface names (eth0, eth1)
|
||||||
NET_IFACE_NAME=$NET_IFACE
|
NET_IFACE_NAME=$NET_IFACE
|
||||||
NET2_IFACE_NAME=$NET2_IFACE
|
NET2_IFACE_NAME=$NET2_IFACE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$NET_HOSTNAME" ] && NET_HOSTNAME="openelec"
|
[ -z "$NET_HOSTNAME" ] && NET_HOSTNAME="openelec"
|
||||||
|
|
||||||
# setup hostname
|
# setup hostname
|
||||||
progress "Setup hostname"
|
progress "Setup hostname"
|
||||||
echo "$NET_HOSTNAME" > /proc/sys/kernel/hostname
|
echo "$NET_HOSTNAME" > /proc/sys/kernel/hostname
|
||||||
|
|
||||||
# create /etc/hosts file, useful for gethostbyname(localhost)
|
# create /etc/hosts file, useful for gethostbyname(localhost)
|
||||||
progress "creating /etc/hosts"
|
progress "creating /etc/hosts"
|
||||||
echo -e "127.0.0.1\tlocalhost $NET_HOSTNAME" > /etc/hosts
|
echo -e "127.0.0.1\tlocalhost $NET_HOSTNAME" > /etc/hosts
|
||||||
|
|
||||||
# add user defined hosts.conf entry's
|
# add user defined hosts.conf entry's
|
||||||
[ -f $HOME/.config/hosts.conf ] && cat $HOME/.config/hosts.conf >> /etc/hosts
|
[ -f $HOME/.config/hosts.conf ] && cat $HOME/.config/hosts.conf >> /etc/hosts
|
||||||
|
|
||||||
(
|
(
|
||||||
# setup Networking 1
|
# setup Networking 1
|
||||||
progress "setup Networking 1"
|
progress "setup Networking 1"
|
||||||
|
|
||||||
@ -168,7 +170,7 @@ fi
|
|||||||
[ -n "$NET2_DNS3" ] && NET2_NAMESERVER="$NET2_NAMESERVER;$NET2_DNS3"
|
[ -n "$NET2_DNS3" ] && NET2_NAMESERVER="$NET2_NAMESERVER;$NET2_DNS3"
|
||||||
[ -n "$NET2_NAMESERVER" ] && echo "Nameservers=$NET2_NAMESERVER;" >> $CONNMAN_PROFILE
|
[ -n "$NET2_NAMESERVER" ] && echo "Nameservers=$NET2_NAMESERVER;" >> $CONNMAN_PROFILE
|
||||||
|
|
||||||
(
|
(
|
||||||
# wait some time, put eth1 (NET2_IFACE) down and then up
|
# wait some time, put eth1 (NET2_IFACE) down and then up
|
||||||
# this is just temporary solution until I figure out how to
|
# this is just temporary solution until I figure out how to
|
||||||
# do properly with connman
|
# do properly with connman
|
||||||
@ -176,7 +178,7 @@ fi
|
|||||||
ifconfig $NET2_IFACE_NAME down
|
ifconfig $NET2_IFACE_NAME down
|
||||||
usleep 1000000
|
usleep 1000000
|
||||||
ifconfig $NET2_IFACE_NAME up
|
ifconfig $NET2_IFACE_NAME up
|
||||||
)&
|
)&
|
||||||
|
|
||||||
fi
|
fi
|
||||||
# END OF NETWORK 2
|
# END OF NETWORK 2
|
||||||
@ -193,4 +195,9 @@ fi
|
|||||||
/usr/sbin/connmand -n > /dev/null 2>&1
|
/usr/sbin/connmand -n > /dev/null 2>&1
|
||||||
usleep 250000
|
usleep 250000
|
||||||
done
|
done
|
||||||
)&
|
)&
|
||||||
|
;;
|
||||||
|
|
||||||
|
poweroff|reboot)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user