From 183465123fd3e6a201d367335a1b6c9521ecf89e Mon Sep 17 00:00:00 2001 From: eball Date: Tue, 30 Jul 2024 01:10:58 +0800 Subject: [PATCH] fix: ntpdate error (#266) * fix: ntpdate error * fix: hwclock --------- Co-authored-by: liuyu <> --- build/installer/install_cmd.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build/installer/install_cmd.sh b/build/installer/install_cmd.sh index 79120b3c..b4b62fa3 100644 --- a/build/installer/install_cmd.sh +++ b/build/installer/install_cmd.sh @@ -319,9 +319,13 @@ precheck_os() { 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" + $sh_c "apt install ntpdate -y" + + local ntpdate=$(command -v ntpdate) + local hwclock=$(command -v hwclock) + + $sh_c "$ntpdate -b -u pool.ntp.org" + $sh_c "$hwclock -w" } is_debian() {