src: watch ofono service for new modem

If system is using ofono, use ofono dbus service to figure out the
modem's USB id.
This commit is contained in:
Bhushan Shah
2021-03-15 12:29:47 +05:30
parent dcb1a9a050
commit 060dc9ae32
8 changed files with 458 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
#!/bin/bash
DEST="$1"
OBJ_PATH="$2"
METHOD="$3"
shift 3
dbus-send "$@" --print-reply --dest="$DEST" "$OBJ_PATH" "$METHOD" | \
grep -v '^method return' | \
sed -e 's/^[[:space:]]\+string "</</' \
-e 's_</node>"_</node>_'