Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions systemd/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
all:
cp cpud.service /etc/systemd/system/cpud.service

reload:
systemctl daemon-reload
systemctl enable --now cpud

Comment on lines +1 to +7
7 changes: 7 additions & 0 deletions systemd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This is a primitive unit file for systemd.

For now, it is for small embedded systems, with a shared key: /key.pub.

We welcome improvements.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ironic. =)



11 changes: 11 additions & 0 deletions systemd/cpud.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=CPU daemon
After=network.target

[Service]
ExecStart=/usr/bin/cpud -pk /key.pub
Restart=on-failure
Comment on lines +6 to +7

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems reasonable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is likely just pkg-ed in initramfs per PR description ("small embedded system"), so the bot seems to have hallucinated that this is a regular go cmd to be go install-ed (?)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, the env part seems like it's assuming a regular distro that has /usr/bin/env, which u-root might not have. btw, i think this might not be for u-root either. from talking with ron on the side, i thought this was just some random distribution.

that said, it's not wrong about the discrepancy between saying "cpud just needs to be in $PATH" and hardcoding /usr/bin/cpud.

systemd requires absolute paths (i think), so you have to make some assumption: either about the existence of /usr/bin/env or the location of cpud. either way is fine with me.


[Install]
WantedBy=multi-user.target

Loading