mirror of git://git.sysmocom.de/ofono
Add disable-modem script
This commit is contained in:
parent
781f9cc0d0
commit
0d099a37ba
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import dbus
|
||||||
|
|
||||||
|
bus = dbus.SystemBus()
|
||||||
|
|
||||||
|
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||||
|
'org.ofono.Manager')
|
||||||
|
|
||||||
|
properties = manager.GetProperties()
|
||||||
|
|
||||||
|
path = properties["Modems"][0]
|
||||||
|
|
||||||
|
modem = dbus.Interface(bus.get_object('org.ofono', path),
|
||||||
|
'org.ofono.Modem')
|
||||||
|
|
||||||
|
modem.SetProperty("Powered", dbus.Boolean(0))
|
Loading…
Reference in New Issue