Skip to content

Commit

Permalink
meta-opentrons/systemd: add DNS + NTP servers that are reachable from…
Browse files Browse the repository at this point in the history
… China.
  • Loading branch information
vegano1 committed Sep 5, 2024
1 parent 2ad1ac9 commit 58597b0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Google DNS is not available in China so we alternative.

[Resolve]
DNS=8.8.8.8 2001:da8::666
FallbackDNS=1.1.1.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Google NTP is not available in China so we use alternative.

[Time]
NTP=time.google.com time.cloudflare.com ntp.tencent.com
FallbackNTP=pool.ntp.org
21 changes: 21 additions & 0 deletions layers/meta-opentrons/recipes-core/systemd/systemd_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# xz support was present on older builds and must be present now to read journal files
# from before the upgrade
PACKAGECONFIG:append = " xz "
FILESEXTRAPATHS:append := "${THISDIR}/files:"

SRC_URI += " \
file://dns-fallback.conf \
file://ntp-fallback.conf \
"

do_install:append() {
# Google DNS + NTP servers are not reachable from China so use alternatives.
install -d 0755 ${D}${sysconfdir}/systemd/resolved.conf.d
install -d 0755 ${D}${sysconfdir}/systemd/timesyncd.conf.d
install -m 0644 ${WORKDIR}/dns-fallback.conf ${D}${sysconfdir}/systemd/resolved.conf.d/
install -m 0644 ${WORKDIR}/ntp-fallback.conf ${D}${sysconfdir}/systemd/timesyncd.conf.d/
}

FILES:${PN} += " \
${sysconfdir}/systemd/resolved.conf.d \
${sysconfdir}/systemd/timesyncd.conf.d \
${sysconfdir}/systemd/resolved.conf.d/ntp-fallback.conf \
${sysconfdir}/systemd/timesyncd.conf.d/dns-fallback.conf \
"

0 comments on commit 58597b0

Please sign in to comment.