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 ba70abf commit eae809f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build-image/first-boot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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... "
Expand Down
8 changes: 4 additions & 4 deletions functions/openhab.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions functions/wifi.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit eae809f

Please sign in to comment.