Projet

Général

Profil

« Précédent | Suivant » 

Révision b075c1e2

Ajouté par Chris Buechler il y a plus de 9 ans

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.

Voir les différences:

etc/inc/services.inc
893 893
	if (!file_exists("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"))
894 894
		@touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases");
895 895

  
896
	/* make sure there isn't a stale dhcpd.pid file, which can make dhcpd fail to start.   */
897
	/* if we get here, dhcpd has been killed and is not started yet                        */ 
898
	unlink_if_exists("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpd.pid");
899

  
896 900
	/* fire up dhcpd in a chroot */
897 901
	if (count($dhcpdifs) > 0) {
898 902
		mwexec("/usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpd.conf -pf {$g['varrun_path']}/dhcpd.pid " .
......
1300 1304
	if (!file_exists("{$g['dhcpd_chroot_path']}/var/db/dhcpd6.leases"))
1301 1305
		@touch("{$g['dhcpd_chroot_path']}/var/db/dhcpd6.leases");
1302 1306

  
1307
        /* make sure there isn't a stale dhcpdv6.pid file, which may make dhcpdv6 fail to start.  */
1308
        /* if we get here, dhcpdv6 has been killed and is not started yet                         */
1309
        unlink_if_exists("{$g['dhcpd_chroot_path']}{$g['varrun_path']}/dhcpdv6.pid");
1310

  
1303 1311
	/* fire up dhcpd in a chroot */
1304 1312
	if (count($dhcpdv6ifs) > 0) {
1305 1313
		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