Revision 956950de
Added by Ermal LUÇI about 15 years ago
etc/inc/system.inc | ||
---|---|---|
225 | 225 |
fwrite($fd, $hosts); |
226 | 226 |
fclose($fd); |
227 | 227 |
|
228 |
/* Start the monitoring process for dynamic dhcpclients. */ |
|
229 |
if (isset($config['dnsmasq']['regdhcp'])) { |
|
230 |
/* Make sure we do not error out */ |
|
231 |
@touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"); |
|
232 |
if (file_exists("{$g['varrun_path']}/dhcpleases.pid")) |
|
233 |
sigkillbypid("{$g['varrun_path']}/dhcpleases.pid", "HUP"); |
|
234 |
else |
|
235 |
mwexec("/usr/local/sbin/dhcpleases -l {$g['dhcpd_chroot_path']}/var/db/dhcpd.leases -d {$syscfg['domain']} -p {$g['varrun_path']}/dnsmasq.pid -h {$g['varetc_path']}/hosts"); |
|
236 |
} else { |
|
237 |
sigkillbypid("{$g['varrun_path']}/dhcpleases.pid", "TERM"); |
|
238 |
@unlink("{$g['varrun_path']}/dhcpleases.pid"); |
|
239 |
} |
|
240 |
|
|
228 | 241 |
return 0; |
229 | 242 |
} |
230 | 243 |
|
Also available in: Unified diff
Fixes #374. Actually reload teh dhcpleases utility whenever the hosts files is regenerated to avoid problems.