diff --git a/build-image/first-boot.bash b/build-image/first-boot.bash index fedecd1b5..6c7a5f181 100755 --- a/build-image/first-boot.bash +++ b/build-image/first-boot.bash @@ -152,9 +152,9 @@ fi # fix eventually wrong date (it is the kernel compile date on Raspi OS !) to have valid repo keys if [[ $(date +%y%m%d) -lt 240401 ]]; then - systemctl stop ntp systemd-timesync + systemctl stop systemd-timesyncd timedatectl set-time "2024-04-09 00:00:00" - systemctl start systemd-timesync + systemctl start systemd-timesyncd fi echo -n "$(timestamp) [openHABian] Ensuring network connectivity... " diff --git a/functions/openhab.bash b/functions/openhab.bash index 28add917d..e2038508a 100644 --- a/functions/openhab.bash +++ b/functions/openhab.bash @@ -85,10 +85,10 @@ openhab_setup() { # date needs to be > Jul 20, 23 for openhab repo signing key to be valid # note RPi have no RTC - if [[ $(date +%y%m%d) -lt 230801 ]]; then - systemctl stop ntp systemd-timesync - timedatectl set-time "2023-08-01 00:00:00" - systemctl start systemd-timesync + if [[ $(date +%y%m%d) -lt 240401 ]]; then + systemctl stop systemd-timesyncd + timedatectl set-time "2024-04-09 00:00:00" + systemctl start systemd-timesyncd fi if running_in_docker || [[ -z $OFFLINE ]]; then if ! add_keys "https://openhab.jfrog.io/artifactory/api/gpg/key/public" "$keyName"; then return 1; fi diff --git a/functions/wifi.bash b/functions/wifi.bash index 21835185c..5390d2676 100644 --- a/functions/wifi.bash +++ b/functions/wifi.bash @@ -124,13 +124,6 @@ setup_hotspot() { if [[ $1 == "install" ]]; then # manage networking through network manager echo -n "$(timestamp) [openHABian] Installing Comitup hotspot... " - # fix eventually wrong date to have valid key - if [[ $(date +%y%m%d) -lt 240401 ]]; then - systemctl stop ntp systemd-timesync - timedatectl set-time "2024-04-09 00:00:00" - systemctl start systemd-timesync - fi - DEBIAN_FRONTEND=noninteractive apt install --yes network-manager &> /dev/null systemctl enable --now NetworkManager