2018-04-21, 15:39
Problem: When kodi.service is enabled at boot time, kodi starts before the network is up and thus cannot connect to mysql.
Work around: ssh into the RPi and manually stop kodi.service and manually start kodi.service after it boots.
Details: I want to use systemd-networkd and wpa_supplicant to manage the network. I want to retain the option to plugin a physical cable to eth0 if I need to but generally, only wireless networking will be used unless something breaks and needs manual intervention. As such, I created 2 files in /etc/systemd/network/ shown below.
Question: Is there a modification to kodi.service to cause it to wait for the wireless network to be ready ie via Requires= or Wants= for just the wireless network (see this reference)? When I add After=network-online.target andWants=network-online.target to kodi.service, kodi start up is delayed by 2 min (the default timeout I guess).
Is there a better configuration to systemd-networkd to prevent this?
Work around: ssh into the RPi and manually stop kodi.service and manually start kodi.service after it boots.
Details: I want to use systemd-networkd and wpa_supplicant to manage the network. I want to retain the option to plugin a physical cable to eth0 if I need to but generally, only wireless networking will be used unless something breaks and needs manual intervention. As such, I created 2 files in /etc/systemd/network/ shown below.
Question: Is there a modification to kodi.service to cause it to wait for the wireless network to be ready ie via Requires= or Wants= for just the wireless network (see this reference)? When I add After=network-online.target andWants=network-online.target to kodi.service, kodi start up is delayed by 2 min (the default timeout I guess).
Is there a better configuration to systemd-networkd to prevent this?
Code:
% cat /etc/systemd/network/10-wire.network
[Match]
Name=eth0
[Network]
DHCP=ipv4
[DHCP]
RouteMetric=10
Code:
% cat /etc/systemd/network/20-wireless.network
[Match]
Name=wlan0
[Network]
DHCP=ipv4
[DHCP]
RouteMetric=20