From 7b7c1db0ff148fe29f8d9e4fcd087c10ad38bb2f Mon Sep 17 00:00:00 2001 From: Pops Dylan Date: Thu, 26 Dec 2019 07:45:16 -0800 Subject: [PATCH] main/postmarketos-base: remove initstepslew from chrony configuration (!838) Comment out the initstepslew line in /etc/chrony/chrony.conf. initstepslew can delay booting while chrony sets the time. The makestep 1 -1 line in the configuration also causes chrony to step the time (whenever the offset is greater than 1s), making initstepslew redundant. --- main/postmarketos-base/APKBUILD | 2 +- .../postmarketos-base/postmarketos-base.post-install | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/main/postmarketos-base/APKBUILD b/main/postmarketos-base/APKBUILD index 0589acd38..b9082e83d 100644 --- a/main/postmarketos-base/APKBUILD +++ b/main/postmarketos-base/APKBUILD @@ -1,6 +1,6 @@ pkgname=postmarketos-base pkgver=3 -pkgrel=31 +pkgrel=32 pkgdesc="Meta package for minimal postmarketOS base" url="https://postmarketos.org" arch="noarch" diff --git a/main/postmarketos-base/postmarketos-base.post-install b/main/postmarketos-base/postmarketos-base.post-install index 296958cb3..6c53ba7b0 100644 --- a/main/postmarketos-base/postmarketos-base.post-install +++ b/main/postmarketos-base/postmarketos-base.post-install @@ -80,8 +80,16 @@ touch /etc/wpa_supplicant/wpa_supplicant.conf echo "- Modifying: /etc/sudoers" sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers -# Set chrony to quickly correct system time on first boot, if necessary +# Set chrony to quickly correct system time whenever it differs from +# ntp time by more than 1s. if ! grep -q "makestep" /etc/chrony/chrony.conf; then - echo "- Modifying: /etc/chrony/chrony.conf" + echo "- Modifying: /etc/chrony/chrony.conf (adding makestep)" echo "makestep 1 -1" >> /etc/chrony/chrony.conf fi + +# Comment out initstepslew in the chrony configuration to avoid a delay +# during boot. +if grep -q "^initstepslew" /etc/chrony/chrony.conf; then + echo "- Modifying: /etc/chrony/chrony.conf (removing initstepslew)" + sed -i 's/^initstepslew/#initstepslew/' /etc/chrony/chrony.conf +fi