mirror of
https://github.com/eblot/pybootd.git
synced 2024-09-11 22:17:44 +03:00
Added always_check option for http auth
This commit is contained in:
parent
d4ad0a479d
commit
982a6728a0
@ -29,6 +29,7 @@ boot_file = pxelinux.0
|
||||
location = 127.0.0.1:13400
|
||||
pxe = boot
|
||||
dhcp = linux
|
||||
always_check = disable
|
||||
|
||||
[tftp]
|
||||
;address = (use address from bootpd)
|
||||
|
@ -394,6 +394,7 @@ class BootpServer:
|
||||
netloc = self.config.get(self.access, 'location')
|
||||
path = self.config.get(self.access, pxe and 'pxe' or 'dhcp')
|
||||
timeout = int(self.config.get(self.access, 'timeout', '5'))
|
||||
always_check = self.config.get(self.access, 'always_check')
|
||||
parameters = {'mac' : mac_str}
|
||||
if uuid:
|
||||
parameters['uuid'] = uuid_str
|
||||
@ -402,7 +403,10 @@ class BootpServer:
|
||||
item = uuid_str or mac_str
|
||||
# only bother the authentication host when a state change is
|
||||
# required.
|
||||
if currentstate != newstate:
|
||||
checkhost = currentstate != newstate
|
||||
if to_bool(always_check):
|
||||
checkhost = True
|
||||
if checkhost:
|
||||
query = urllib.urlencode(parameters)
|
||||
urlparts = (self.access, netloc, path, query, '')
|
||||
url = urlparse.urlunsplit(urlparts)
|
||||
|
Loading…
Reference in New Issue
Block a user