modem: fix missing call log entries and rejected calls still ringing

On a freshly flashed image the root-run dual-SIM daemon created
~/.local/share/sxmo/modem as root. sxmo_modemcall.sh runs under set -e,
so its failed modemlog.tsv write aborted hangup() before the call was
ended on the network (the caller kept ringing), and no call was ever
logged for xcalllog.

- dsds-daemon: create the log and call state directories owned by user,
  append to modemlog.tsv through a helper that keeps it user-owned, and
  repair root-owned leftovers on start; never create /run/user/10000.
- sxmo_modemcall.sh: make log_event non-fatal and hang up on the network
  before logging and running the hangup/discard hooks.
- sxmo_modemmonitor.sh: only fall back to an unprivileged dsds-daemon
  when doas is unavailable, not whenever the root instance exits.
- apply-bananarchy-overlay.sh: pre-create the modem and block log
  directories in the image.
This commit is contained in:
Luxferre committed 2026-10-28 20:07:42 +02:00
1 parent 99e2280590
commit a4dbf71af9
5 files changed
+119 -33

No files matched your search

+4
View File
@@ -45,6 +45,10 @@ cp -af "$BASE_DIR/overlay/rootfs/." "$TARGET_ROOTFS/"
if [ -x "$BASE_DIR/scripts/version.sh" ]; then
"$BASE_DIR/scripts/version.sh" "$TARGET_ROOTFS"
fi
# Pre-create the user's modem/SMS log and blocklist directories so that the
# root-run dual-SIM daemon never creates them root-owned on a fresh image.
mkdir -p "$TARGET_ROOTFS/home/user/.local/share/sxmo/modem" \
"$TARGET_ROOTFS/home/user/.local/share/sxmo/block"
chown -R 10000:10000 "$TARGET_ROOTFS/home/user" 2>/dev/null || true
chown 0:0 "$TARGET_ROOTFS/etc/doas.d/50-sxmo.conf" 2>/dev/null || true
chmod 640 "$TARGET_ROOTFS/etc/doas.d/50-sxmo.conf" 2>/dev/null || true