modem: add van-sms-send CLI for sending SMS ad hoc

mmcli's inline "number=...,text=..." properties string breaks on plain
spaces/quotes/colons in the text — found while testing van-sms-watch.
Sidesteps that entirely by passing the message via
--messaging-create-sms-with-text=<tempfile> instead. Tested live
(multi-word text, punctuation, multi-line stdin input all delivered).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Andreas Wrede
2026-08-21 15:40:22 -04:00
co-authored by Claude Sonnet 5
parent a74257e44b
commit db22cb50d6
2 changed files with 99 additions and 0 deletions
+3
View File
@@ -156,6 +156,9 @@ install_rendered failover/van-modem-watch.service /etc/systemd/system/van-modem-
# can't be fetched here (see script docstring) — notification-only paging.
install -D -m0755 modem/van-sms-watch /usr/local/sbin/van-sms-watch
install -D -m0644 modem/van-sms-watch.service /etc/systemd/system/van-sms-watch.service
# CLI to send an SMS ad hoc (needs sudo — ModemManager's Messaging actions
# are PolicyKit-gated). Not a service, just a tool: sudo van-sms-send <number> <text>
install -D -m0755 modem/van-sms-send /usr/local/sbin/van-sms-send
echo "== cockpit plugin =="
install -d /usr/share/cockpit/vanrouter