Install custom systemd-networkd-wait-online.service[0] with --any flag to allow boot to proceed when ANY network interface is online instead of waiting for ALL interfaces to be online. This enables faster boot and allows docker/services[1] to start immediately when any of the network interface is up.
[0]: https://www.freedesktop.org/software/systemd/man/latest/systemd-networkd-wait-online.service.html#--any [1]: https://git.ti.com/cgit/ti-sdk-linux/meta-tisdk/commit/?&id=386464bbdd2e857d08daf4c44c4e2e24c62e3be8 Signed-off-by: Telukula Jeevan Kumar Sahu <[email protected]> Signed-off-by: Chirag Shilwant <[email protected]> --- .../recipes-core/systemd/systemd-arago.inc | 4 +++ .../systemd-networkd-wait-online.service | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 meta-arago-distro/recipes-core/systemd/systemd/systemd-networkd-wait-online.service diff --git a/meta-arago-distro/recipes-core/systemd/systemd-arago.inc b/meta-arago-distro/recipes-core/systemd/systemd-arago.inc index 3c31b92d..3ca38edc 100644 --- a/meta-arago-distro/recipes-core/systemd/systemd-arago.inc +++ b/meta-arago-distro/recipes-core/systemd/systemd-arago.inc @@ -8,6 +8,7 @@ SRC_URI:append = " \ file://30-wlan.network \ file://60-usb.network \ file://timesyncd.conf \ + file://systemd-networkd-wait-online.service \ " do_install:append() { @@ -28,6 +29,9 @@ do_install:append() { install -d ${D}${sysconfdir}/systemd/ install -m 0644 ${UNPACKDIR}/timesyncd.conf ${D}${sysconfdir}/systemd/ + # Install systemd-networkd-wait-online with --any flag for faster boot + install -m 0644 ${UNPACKDIR}/systemd-networkd-wait-online.service ${D}${systemd_system_unitdir}/ + # Remove new prompt code that is polluting the testing output rm ${D}/${nonarch_libdir}/tmpfiles.d/20-systemd-osc-context.conf rm ${D}/${nonarch_libdir}/systemd/profile.d/80-systemd-osc-context.sh diff --git a/meta-arago-distro/recipes-core/systemd/systemd/systemd-networkd-wait-online.service b/meta-arago-distro/recipes-core/systemd/systemd/systemd-networkd-wait-online.service new file mode 100644 index 00000000..bb349527 --- /dev/null +++ b/meta-arago-distro/recipes-core/systemd/systemd/systemd-networkd-wait-online.service @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Wait for Network to be Configured +Documentation=man:systemd-networkd-wait-online.service(8) +DefaultDependencies=no +Conflicts=shutdown.target +Requires=systemd-networkd.service +After=systemd-networkd.service +Before=network-online.target shutdown.target + +[Service] +Type=oneshot +ExecStart=/lib/systemd/systemd-networkd-wait-online --any +RemainAfterExit=yes + +[Install] +WantedBy=network-online.target -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#17420): https://lists.yoctoproject.org/g/meta-arago/message/17420 Mute This Topic: https://lists.yoctoproject.org/mt/118465823/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
