Skip to content

Add Entware init scripts for systems without systemd - #8

Merged
xbmc4lyfe merged 3 commits into
mainfrom
claude/entware-init-scripts
Nov 5, 2026
Merged

xbmc4lyfe merged 3 commits into
mainfrom
claude/entware-init-scripts

Conversation

@xbmc4lyfe

Copy link
Copy Markdown
Contributor

Requested by Allen · project thread

Summary

Entware's own feed needs a package that runs without systemd, so this adds two init scripts:

  • /opt/etc/init.d/S90warmup-rs runs the metadata crawl, and S91warmup-images runs the image crawl. They share their start and stop logic in /opt/share/warmup-rs/warmup.sh.
  • Each script keeps its own pid file. Both crawls run the same warmup-rs binary, so Entware's rc.func can't tell them apart with pidof.
  • Both scripts start with ENABLED=no, and they're conffiles, so upgrades keep the setting. That stops CoreELEC from running each crawl twice, once from systemd and once from Entware's boot scripts.
  • stop waits 30 seconds for the crawl to finish its writes, the same as the systemd units, and then kills it.
  • postinst explains the scripts on systems without systemd, and an upgrade restarts any crawl that's running. prerm stops the scripts when the package is removed.
  • The Entware package page has a new "Systems without systemd" section.

A tagged release is the other thing the Entware submission needs. That isn't part of this PR.

Testing

  • Built an ipk from a stub binary with scripts/build-ipk.py. It contains the scripts, and conffiles lists the env file and both scripts.
  • Ran the scripts against a stub binary in a temporary /opt. Checked a disabled start, start, a second start, check, and stop, which sends SIGTERM. The env file's values reach the process.
  • Vale wasn't available here. The Pages workflow runs it on this PR.
  • Not tried on a real Entware box yet.

Generated by Claude Code

Entware's own feed needs a package that runs without systemd. Two init
scripts in /opt/etc/init.d now run the metadata and image crawls, with
pid files so the two warmup-rs processes can be stopped one at a time.
They start disabled, so CoreELEC keeps using the systemd units.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG44gW5bMySbSKFF1ZGDNn
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T21:36:34.695545Z 8931387 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 372b695b94

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packaging/opkg/init.d/warmup.sh Resolved
A pid file left by a crash can name an unrelated process that reused
the pid. The init scripts now check /proc for warmup-rs in their own
mode before they report it running or signal it. The docs and the
start message say off instead of disabled, as Google style asks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG44gW5bMySbSKFF1ZGDNn

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b78aa2c80b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packaging/opkg/init.d/warmup.sh Resolved
Outside CoreELEC, warmup-rs keeps its files in ./output, so a crawl
started from another folder used other databases. The scripts now
start in /opt/var/lib/warmup-rs. Also spell PID in capitals for Vale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG44gW5bMySbSKFF1ZGDNn
@xbmc4lyfe
xbmc4lyfe merged commit b29a501 into main Nov 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant