Révision a762649b
Ajouté par Chris Buechler il y a plus de 9 ans
etc/inc/services.inc | ||
---|---|---|
898 | 898 |
if (!file_exists("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases")) |
899 | 899 |
@touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"); |
900 | 900 |
|
901 |
/* make sure there isn't a stale dhcpd.pid file, which can make dhcpd fail to start. */ |
|
902 |
/* if we get here, dhcpd has been killed and is not started yet */ |
|
903 |
unlink_if_exists("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpd.pid"); |
|
904 |
|
|
901 | 905 |
/* fire up dhcpd in a chroot */ |
902 | 906 |
if (count($dhcpdifs) > 0) { |
903 | 907 |
mwexec("/usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpd.conf -pf {$g['varrun_path']}/dhcpd.pid " . |
... | ... | |
1215 | 1219 |
if (!file_exists("{$g['dhcpd_chroot_path']}/var/db/dhcpd6.leases")) |
1216 | 1220 |
@touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd6.leases"); |
1217 | 1221 |
|
1222 |
/* make sure there isn't a stale dhcpdv6.pid file, which may make dhcpdv6 fail to start. */ |
|
1223 |
/* if we get here, dhcpdv6 has been killed and is not started yet */ |
|
1224 |
unlink_if_exists("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid"); |
|
1225 |
|
|
1218 | 1226 |
/* fire up dhcpd in a chroot */ |
1219 | 1227 |
if (count($dhcpdv6ifs) > 0) { |
1220 | 1228 |
mwexec("/usr/local/sbin/dhcpd -6 -user dhcpd -group _dhcp -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpdv6.conf -pf {$g['varrun_path']}/dhcpdv6.pid " . |
Formats disponibles : Unified diff
delete the dhcpd.pid file before starting dhcpd. Fixes bug where on rare occasions a stale PID file could prevent dhcpd from starting until it's manually deleted.