1 #!/usr/bin/python 2 3 import dbus, flimflam, sys 4 5 if (len(sys.argv) < 2): 6 print "Usage: %s [true|false]" % (sys.argv[0]) 7 sys.exit(1) 8 9 do_arp_gw = sys.argv[1].lower() 10 if do_arp_gw not in ('true', 'false'): 11 print "Argument must be 'true' or 'false'" 12 sys.exit(1) 13 14 flim = flimflam.FlimFlam(dbus.SystemBus()) 15 flim.SetArpGateway(do_arp_gw == 'true') 16