-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta-opentrons/systemd: add DNS + NTP servers that are reachable from…
… China.
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
layers/meta-opentrons/recipes-core/systemd/files/dns-fallback.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
5 changes: 5 additions & 0 deletions
5
layers/meta-opentrons/recipes-core/systemd/files/ntp-fallback.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
21
layers/meta-opentrons/recipes-core/systemd/systemd_%.bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ | ||
" |