Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: apt update failed with wrong clock time #261

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion build/installer/install_cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ precheck_os() {
$sh_c "chattr -i /etc/resolv.conf"
fi

$sh_c "apt remove unattended-upgrades -y"
$sh_c "apt install nptdata -y"
$sh_c "nptdata -b -u pool.ntp.org"
$sh_c "hwclock -w"
}

is_debian() {
Expand Down Expand Up @@ -430,7 +434,8 @@ config_system() {
natgateway=""

# kernel printk log level
ensure_success $sh_c 'sysctl -w kernel.printk="3 3 1 7"'
# cause SIGSTOP in ubuntu 22.04
# ensure_success $sh_c 'sysctl -w kernel.printk="3 3 1 7"'

# ntp sync
ntpdate=$(command -v ntpdate)
Expand Down
Loading