meta-agl-core: Improve connman-wait-online usability
[AGL/meta-agl.git] / meta-agl-core / recipes-core / systemd / systemd_aglcore.inc
1 FILESEXTRAPATHS:prepend := "${THISDIR}/systemd:"
2
3 SRC_URI += "\
4     file://e2fsck.conf \
5     file://wait-disable.conf \
6     file://wired.network \
7 "
8
9 # Enable networkd/resolved support if using systemd for network management
10 PACKAGECONFIG:append = " \
11    ${@bb.utils.contains('VIRTUAL-RUNTIME_net_manager','systemd','networkd resolved','',d)} \
12    iptc \
13 "
14
15 # SPEC-737: connmand also has a NTP client which races with systemd-timesyncd
16 PACKAGECONFIG:remove = "timesyncd"
17
18 # Enable systemd-coredump when agl-devel is set on
19 PACKAGECONFIG:append:agl-devel = " coredump"
20
21 do_install:append() {
22     # Install /etc/e2fsck.conf to avoid boot stuck by wrong clock time
23     install -m 644 -p -D ${WORKDIR}/e2fsck.conf ${D}${sysconfdir}/e2fsck.conf
24
25     if [ "${VIRTUAL-RUNTIME_net_manager}" = "systemd" ]; then
26        # Install DHCP configuration for Ethernet adapters
27        install -m 644 ${WORKDIR}/wired.network ${D}${sysconfdir}/systemd/network
28     elif [ "${VIRTUAL-RUNTIME_net_manager}" = "connman" ]; then
29        # Disable systemd-networkd-wait-online by default
30        install -d ${D}${systemd_system_unitdir}/systemd-networkd-wait-online.service.d
31        install -m 0644 ${WORKDIR}/wait-disable.conf ${D}${systemd_system_unitdir}/systemd-networkd-wait-online.service.d/
32     fi
33 }
34
35 FILES:${PN} += "${sysconfdir}/e2fsck.conf "
36