Fix hostname configuration and deprecate mid-boot network service restart to resolve boot wifi issues.

This commit is contained in:
fewtarius 2023-05-23 11:21:03 +00:00
parent 614428d4f6
commit a567184cf4
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
3 changed files with 8 additions and 14 deletions

View file

@ -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 &

View file

@ -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

View file

@ -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