Skip to content

Commit

Permalink
reimplemented chrony-waitsync (fixes boot issues)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashoechst committed Apr 30, 2024
1 parent 6e3dcc1 commit a90267f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 30 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{github.ref_name}} tsOS-Base-arm64-${{github.ref_name}}.zip

build-armhf:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
submodules: recursive
token: ${{ secrets.PAT_JONASHOECHST }}

- name: Run tsOS-Base-armhf.Pifile
uses: Nature40/pimod@v0.6.0
with:
pifile: tsOS-Base-armhf.Pifile

- name: Package tsOS-Base-armhf-${{github.ref_name}}.zip
if: startsWith(github.ref, 'refs/tags/')
run: |
mv tsOS-Base-armhf.img tsOS-Base-armhf-${{github.ref_name}}.img
zip tsOS-Base-armhf-${{github.ref_name}}.zip tsOS-Base-armhf-${{github.ref_name}}.img
- name: Upload Release tsOS-Base-armhf-${{github.ref_name}}.zip
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{github.ref_name}} tsOS-Base-armhf-${{github.ref_name}}.zip

11 changes: 11 additions & 0 deletions etc/systemd/system/chrony-waitsync.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Wait until chrony timesync and notify systemd.
After=chrony.service

[Service]
ExecStart=/bin/bash -c 'chronyc waitsync && (mkdir -p /run/systemd/timesync/; touch /run/systemd/timesync/synchronized)'
Type=oneshot
StandardOutput=journal

[Install]
RequiredBy=multi-user.target
4 changes: 2 additions & 2 deletions tsOS-Base.Pifile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

FROM https://downloads.raspberrypi.com/raspios_lite_${ARCH}/images/raspios_lite_${ARCH}-2023-12-11/2023-12-11-raspios-bookworm-${ARCH}-lite.img.xz
TO "tsOS-Base-${ARCH}.img"
PUMP 1800M
PUMP 1200M

#################################################
### install software
Expand Down Expand Up @@ -139,7 +139,7 @@ RUN git config --global user.name "tsOS User"
RUN systemctl enable hostname-config.service

# Enabling wait for time-sync.target (depending services will not start before the clock is synced)
RUN systemctl enable systemd-time-wait-sync-prepare.service systemd-time-wait-sync.service
RUN systemctl enable chrony-waitsync.service systemd-time-wait-sync-prepare.service systemd-time-wait-sync.service

# Reboot on kernel panic
RUN bash -c "echo kernel.panic=10 | tee -a /etc/sysctl.conf"
Expand Down

0 comments on commit a90267f

Please sign in to comment.