mirror of
https://github.com/rwinkhart/artix-install-script.git
synced 2026-08-27 20:36:26 -04:00
Only sync ntp once per week, sync to hardware clock
This commit is contained in:
+1
-2
@@ -20,8 +20,7 @@ echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
|
||||
echo 'LANG=en_US.UTF-8' > /etc/locale.conf
|
||||
ln -s /usr/share/zoneinfo/"$timezone" /etc/localtime
|
||||
locale-gen
|
||||
hwclock --systohc --utc
|
||||
echo -e "#!/bin/sh\nntpdate -b pool.ntp.org &" > /etc/local.d/ntp.start
|
||||
curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/programs/ntp-rclocal/ntp.start -o /etc/local.d/ntp.start
|
||||
chmod 755 /etc/local.d/ntp.start
|
||||
|
||||
# networkmanager configuration
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
loadkeys us
|
||||
echo ----------------------------------------------------------------------------------------------
|
||||
echo rwinkhart\'s artix install script
|
||||
echo last updated december 28, 2023 \(rev. A\)
|
||||
echo last updated january 10, 2024 \(rev. A\)
|
||||
echo ----------------------------------------------------------------------------------------------
|
||||
echo You will be asked some questions before installation.
|
||||
echo -e "----------------------------------------------------------------------------------------------\n"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
old_timestamp="$(</etc/local.d/.ntpsync)"
|
||||
new_timestamp="$(date +%s)"
|
||||
if [ "$((new_timestamp-old_timestamp))" -gt 604800 ]; then
|
||||
ntpdate -b pool.ntp.org
|
||||
hwclock --systohc --utc
|
||||
echo "$new_timestamp" > /etc/local.d/.ntpsync
|
||||
fi
|
||||
Reference in New Issue
Block a user