Merge pull request #1450 from fewtarius/dev

Fix hostname configuration and deprecate mid-boot network service restart to resolve boot wifi issues.
This commit is contained in:
fewtarius 2023-05-23 07:21:37 -04:00 committed by GitHub
commit c3fb5d608e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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