How to issue an "ifup broadband" when this is logged

Aleksander Morgado aleksander at aleksander.es
Tue Feb 7 22:19:56 UTC 2017


On Tue, Feb 7, 2017 at 11:10 PM, Russ Westrem
<lspwaterproofing at gmail.com> wrote:
> Out of it from everything I know.
>
> I'm thinking of going the easy route and doing a tail of the logfile

Oh please no; don't do that.

If you can run a script, you could source the  modemmanager.proto file and then:

# Load connected bearer information
bearerpath=$(modemmanager_get_bearer "${device}")
bearerstatus=$(/usr/bin/mmcli --bearer "${bearerpath}")

being ${device} the sysfs path configured for the modem

The bearerstatus variable will say connected/disconnected, and if
disconnected, you can ifup the interface yourself


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list