Skip to content

ssh device: run pre/post commands around the runnable - #269

Merged
kali merged 1 commit into
mainfrom
ssh-device-pre-post-run-command
Aug 19, 2026
Merged

ssh device: run pre/post commands around the runnable#269
kali merged 1 commit into
mainfrom
ssh-device-pre-post-run-command

Conversation

@kali

@kali kali commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

There was no way to snapshot device state (cpu freq, load) right around an ssh-device run without wrapping the whole invocation externally. Add pre_run_commands/post_run_commands lists to SshDeviceConfiguration, spliced into the same remote shell invocation; the runnable's own exit status is preserved through $RC regardless of what either hook returns. Empty lists contribute no segment, so a device with neither configured gets the exact same command as before.

Comment thread dinghy-lib/src/config.rs Outdated
There was no way to snapshot device state (cpu freq, load) right
around an ssh-device run without wrapping the whole invocation
externally. Add pre_run_commands/post_run_commands lists to
SshDeviceConfiguration, spliced into the same remote shell
invocation; the runnable's own exit status is preserved through $RC
regardless of what either hook returns. Empty lists contribute no
segment, so a device with neither configured gets the exact same
command as before.
@kali
kali force-pushed the ssh-device-pre-post-run-command branch from cbd056d to 6c19828 Compare August 19, 2026 12:34
@kali
kali merged commit c781003 into main Aug 19, 2026
10 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.

2 participants