blob: 5f80e1d2c931530e094bb2ad4e2fba94aef95ad4 [file] [log] [blame]
Christopher Wiley2f48d952013-02-22 09:51:47 -08001#!/usr/bin/python
2
3import dbus, flimflam, sys
4
5if (len(sys.argv) < 2):
6 print "Usage: %s <mtu>" % (sys.argv[0])
7 sys.exit(1)
8
9(_, mtu) = sys.argv
10
11flim = flimflam.FlimFlam(dbus.SystemBus())
12
13for device in flim.GetObjectList("Device"):
14 device_properties = device.GetProperties(utf8_strings = True)
15
16 for path in device_properties["IPConfigs"]:
17 ipconfig = flim.GetObjectInterface("IPConfig", path)
18 ipconfig.SetProperty("Mtu", int(mtu))