From 677de98317aeb1bdfe0f22c9fdff8d95f2057265 Mon Sep 17 00:00:00 2001 From: ytshih Date: Mon, 28 Jul 2025 23:49:59 +0800 Subject: [PATCH] Feat: add ntp settings --- PKGBUILD | 5 ++++- hl-base-env.install | 11 ++++++++++- timesyncd.conf | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 timesyncd.conf diff --git a/PKGBUILD b/PKGBUILD index 345cd94..a9689c2 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -20,6 +20,7 @@ source=( 'install.sh' '90-editor.sh' 'hl-rootca.crt' + 'timesyncd.conf' ) package() { @@ -30,9 +31,11 @@ package() { install -Dm755 install.sh "$pkgdir/usr/lib/$pkgname/install.sh" install -Dm644 90-editor.sh "$pkgdir/etc/profile.d/90-editor.sh" install -Dm644 hl-rootca.crt "$pkgdir/usr/share/$pkgname/hl-rootca.crt" + install -Dm644 timesyncd.conf "$pkgdir/etc/systemd/timesyncd.conf.d/$pkgname.conf" } sha256sums=('164d84a6db866f8445d8cd2b92a6513de4b8fd0204e4d127432416f13032890b' '453cbec2e5fa38ac9ef618d3254ba4f5fc8aacdc8bb1f17dad00f6089680d580' '9d3f3962e7088ed30962d171536d81e042169ee5c3c46e3f7995eb53b27e71f5' '8df871b1727d147ecc410de3aa6cf24e5bf046f1bfb4b600b60c40acd6c4fa9a' - '1bcae0144eb86eae3948eae7299c99f0b1fc53d0f47884da6dfcaddab503a382') + '1bcae0144eb86eae3948eae7299c99f0b1fc53d0f47884da6dfcaddab503a382' + '2e24060a81df174639d4f3743b42d1cde191724292fa5bd2433d088d7f49b4f9') diff --git a/hl-base-env.install b/hl-base-env.install index a3160cb..4c6c881 100644 --- a/hl-base-env.install +++ b/hl-base-env.install @@ -1,6 +1,15 @@ -post_install() { +_package_changed() { trust anchor --store /usr/share/hl-base-env/hl-rootca.crt update-ca-trust + systemctl enable --now systemd-timesyncd.service +} + +post_install() { + _package_changed +} + +post_upgrade() { + _package_changed } pre_remove() { diff --git a/timesyncd.conf b/timesyncd.conf new file mode 100644 index 0000000..56f3e53 --- /dev/null +++ b/timesyncd.conf @@ -0,0 +1,3 @@ +[Time] +NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org +FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.fr.pool.ntp.org