Got dhcpleasor working, with test ENV for testing, and rpc.cast for real world.

This commit is contained in:
Joshua McKenty
2010-07-07 12:15:11 -07:00
committed by Vishvananda Ishaya
parent b7ea2f7058
commit dbe324f725
7 changed files with 91 additions and 29 deletions

View File

@@ -98,11 +98,10 @@ def dnsmasq_cmd(net):
' --pid-file=%s' % dhcp_file(net['vlan'], 'pid'),
' --listen-address=%s' % net.dhcp_listen_address,
' --except-interface=lo',
' --dhcp-range=%s,static,120s' % (net.dhcp_range_start),
' --dhcp-lease-max=61',
' --dhcp-range=%s,static,600s' % (net.dhcp_range_start),
' --dhcp-hostsfile=%s' % dhcp_file(net['vlan'], 'conf'),
' --dhcp-leasefile=%s' % dhcp_file(net['vlan'], 'leases'),
' ---dhcp-script=%s' % bin_file('dhcpleasor.py')]
' --dhcp-script=%s' % bin_file('dhcpleasor.py'),
' --leasefile-ro']
return ''.join(cmd)
def hostDHCP(network, host, mac):