Fix hostname configuration and deprecate mid-boot network service restart to resolve boot wifi issues.
This commit is contained in:
parent
614428d4f6
commit
a567184cf4
3 changed files with 8 additions and 14 deletions
|
@ -6,15 +6,6 @@
|
|||
|
||||
tocon "Configuring network..."
|
||||
|
||||
HOSTNAME=$(get_setting system.hostname)
|
||||
hostname ${HOSTNAME}
|
||||
avahi-set-host-name ${HOSTNAME}
|
||||
|
||||
for service in connman wpa_supplicant
|
||||
do
|
||||
systemctl restart ${service}
|
||||
done
|
||||
|
||||
if [ "$(get_setting network.enabled)" == "0" ] || [ "$1" == "disable" ]
|
||||
then
|
||||
nohup wifictl disable &
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[Unit]
|
||||
Description=JELOS user autostart script
|
||||
Before=emulationstation.service
|
||||
After=graphical.target
|
||||
After=network-base.service graphical.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# setup hostname
|
||||
if [ -f /storage/.cache/hostname ]; then
|
||||
cat /storage/.cache/hostname > /proc/sys/kernel/hostname
|
||||
fi
|
||||
. /etc/profile
|
||||
|
||||
# Set hostname
|
||||
HOSTNAME=$(get_setting system.hostname)
|
||||
echo ${HOSTNAME} >/proc/sys/kernel/hostname
|
||||
hostnamectl --transient hostname ${HOSTNAME}
|
||||
avahi-set-host-name ${HOSTNAME}
|
||||
|
||||
# setup /etc/hosts
|
||||
rm -f /run/libreelec/hosts
|
||||
|
|
Loading…
Reference in a new issue