Skip to content

Commit

Permalink
fix: apt update failed with wrong clock time (#261)
Browse files Browse the repository at this point in the history
Co-authored-by: liuyu <>
  • Loading branch information
eball authored Jul 26, 2024
1 parent 1a33b2b commit f579f7b
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit f579f7b

Please sign in to comment.