Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add batch mode to smcroutectl #189

Closed
1 task done
troglobit opened this issue Oct 4, 2022 · 0 comments
Closed
1 task done

Add batch mode to smcroutectl #189

troglobit opened this issue Oct 4, 2022 · 0 comments

Comments

@troglobit
Copy link
Owner

troglobit commented Oct 4, 2022

In #185 daemon support for batching multiple transactions was added to the IPC code. For the next release it would be great if we could have this support natively in smcroutectl. E.g.,

$ sudo smcroutectl -f - << EOF
join eth0 225.1.2.3
add eth0 192.168.1.42 225.1.2.3 eth1 eth2
rem eth1 225.3.4.5 eth3
leave eth1 225.3.4.5
EOF

I guess we could use isatty(STDIN_FILENO) go into batch mode automatically:

$ cat << EOF | sudo smcroutectl
join eth0 225.1.2.3
add eth0 192.168.1.42 225.1.2.3 eth1 eth2
rem eth1 225.3.4.5 eth3
leave eth1 225.3.4.5
EOF
troglobit added a commit that referenced this issue Nov 27, 2022
Factor out arg parser to be able to add support for reading batch
commands from stdin.

Issue #189

Signed-off-by: Joachim Wiberg <[email protected]>
troglobit added a commit that referenced this issue Nov 27, 2022
Issue #189

Signed-off-by: Joachim Wiberg <[email protected]>
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

No branches or pull requests

1 participant