Skip to content

Commit

Permalink
motd: maintain a /etc/motd file with interesting info abot the TAC
Browse files Browse the repository at this point in the history
Not anyone looks at the web interface or the display of the TAC.
This gives us a third vector to convey information to the user.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
  • Loading branch information
hnez committed Jan 26, 2024
1 parent e94c996 commit 539b8e8
Show file tree
Hide file tree
Showing 3 changed files with 386 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/target
/.cargo
/demo_files/home/root/.ssh/authorized_keys
/demo_files/etc/motd
/demo_files/var/run/tacd/motd
/web/npm-shrinkwrap.json
/web/oe-logs
/web/oe-workdir
12 changes: 12 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ mod iobus;
mod journal;
mod led;
mod measurement;
mod motd;
mod regulators;
mod setup_mode;
mod system;
Expand Down Expand Up @@ -128,6 +129,17 @@ async fn init(screenshooter: ScreenShooter) -> Result<(Ui, WatchedTasksBuilder)>
// in the web interface.
journal::serve(&mut http_server.server);

// Maintain a /etc/motd with useful information about the TAC
motd::keep_updated(
&mut wtb,
&dut_pwr,
&iobus,
&rauc,
&setup_mode,
&temperatures,
&usb_hub,
)?;

// Set up the user interface for the hardware display on the TAC.
// The different screens receive updates via the topics provided in
// the UiResources struct.
Expand Down
Loading

0 comments on commit 539b8e8

Please sign in to comment.