Repository navigation
Add dmsystem service for ICMP echo response - #2
Merged
Merged
Conversation
dmicmp is a Library-type module with no main() of its own, so nothing spawns it automatically - dmod_init() (where it registers with dmip and starts answering pings) only runs once something loads it. Add configs/icmp.ini, a dmsystem/libsystemd unit that loads dmicmp at boot via a dmell script (configs/icmp-start.dme, module load dmicmp), plus a companion configs/icmp-stop.dme (module unload dmicmp) to stop answering pings, since libsystemd has no ExecStop-style key yet. See docs/service.md for the full rationale. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XcEbAA3VGWGpAoM2pMeTkv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dmicmp is a Library-type DMOD module - it has no
main(), so nothingspawns it as a process on its own. It only starts answering ICMP Echo
Requests (ping) once something calls
dmod_init()by loading it, whichtoday requires a manual step. This adds a
dmsystem/
libsystemdservice so ping response can be turned on (and off) declaratively:
configs/icmp.ini- alibsystemdunit (type=oneshot,exec=dmell)that loads dmicmp at boot.
configs/icmp-start.dme- thedmellscript it runs:module load dmicmp.configs/icmp-stop.dme- companion script,module unload dmicmp, tostop answering pings. Not wired as an "ExecStop" -
libsystemdhas nosuch key yet - so it's run directly instead.
docs/service.md- full rationale: why a Library module needs a scriptinstead of
exec=dmicmpdirectly, whytype=oneshot, and why there'sno
service stop icmp.dmicmp.dmrgets aconfigs=entry soconfigs/is installedalongside the module (mirrors the
dmtty/tools/consoleconvention forshipping a unit file next to its module).
This establishes the first
.dme-as-exec=unit in the DMOD ecosystem(researched across the other module repos - nothing else uses this
pattern yet, though
dmtty/tools/consoleestablished theconfigs/<unit>.ini+.dmrinstall convention this mirrors).Test plan
configs//docs/are data files only, buildunaffected.
configs/icmp.iniinto alibsystemdunits directory (with
args=pointed at the installedicmp-start.dme), bootsystemd, confirm the device answers ping;run
icmp-stop.dmeand confirm it stops.🤖 Generated with Claude Code
https://claude.ai/code/session_01XcEbAA3VGWGpAoM2pMeTkv
Generated by Claude Code