Skip to content

Add init support for nitro#46

Open
je-vv wants to merge 1 commit intoNetworkConfiguration:masterfrom
je-vv:master
Open

Add init support for nitro#46
je-vv wants to merge 1 commit intoNetworkConfiguration:masterfrom
je-vv:master

Conversation

@je-vv
Copy link
Copy Markdown

@je-vv je-vv commented Apr 4, 2026

This merge request is meant to add support for nitro init system, just like dinit and others. It should address issue #47

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

Walkthrough

Added Nitro init tooling detection to detect_init() in resolvconf.in: when /etc/nitro exists and nitroctl is available, RESTARTCMD is set to a conditional snippet that uses nitroctl pidof $1 and only runs nitroctl restart $1 if the service is reported running.

Changes

Cohort / File(s) Summary
Nitro Init Detection
resolvconf.in
Inserted Nitro detection into detect_init() fallback chain (checks /etc/nitro and nitroctl); sets RESTARTCMD to a conditional shell snippet that runs nitroctl restart $1 only when nitroctl pidof $1 indicates the service is running.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add init support for nitro' directly and clearly summarizes the main change: adding support for the nitro init system.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description accurately relates to the changeset, describing the addition of nitro init system support to match existing init systems like dinit.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@resolvconf.in`:
- Around line 478-479: The new RESTARTCMD assignment currently invokes "nitroctl
restart $1" unconditionally; change it to first check service liveness with
"nitroctl pidof $1" (or equivalent) and only call "nitroctl restart $1" when
pidof reports the service is running, otherwise do nothing (preserve the
no-op/silent-failure behavior defined for -r); update the RESTARTCMD binding so
it performs the pidof check and conditional restart to avoid returning non-zero
when the service is absent or stopped.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb3262a5-c788-49ae-8b65-541968b8f53f

📥 Commits

Reviewing files that changed from the base of the PR and between 6489889 and 6756529.

📒 Files selected for processing (1)
  • resolvconf.in

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