Skip to content

Commit

Permalink
fix date to have valid repo keys
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi committed Apr 9, 2024
1 parent 486c3fb commit ba70abf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build-image/first-boot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ elif [[ -n $wifiSSID ]] && grep -qs "openHABian" /etc/wpa_supplicant/wpa_supplic
fi
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
timedatectl set-time "2024-04-09 00:00:00"
systemctl start systemd-timesync
fi

echo -n "$(timestamp) [openHABian] Ensuring network connectivity... "
if ! running_in_docker && tryUntil "ping -c1 8.8.8.8 &> /dev/null || curl --silent --head http://www.openhab.org/docs |& grep -qs 'HTTP/1.1 200 OK'" 5 1; then
echo "FAILED"
Expand Down

0 comments on commit ba70abf

Please sign in to comment.