Project

General

Profile

« Previous | Next » 

Revision 2a1bd027

Added by Seth Mos over 14 years ago

Add the rtadvd deamon to advertise the routing. We still need to make a proper config file if we want it to advertise the Carp IP instead of the interface IP
Also added safety guard for empty dhcp configs

View differences:

etc/inc/services.inc
51 51
	}
52 52
	
53 53
	/* kill any running dhcpd */
54
	if(is_process_running("dhcpd"))
54
	if(is_process_running("dhcpd")) {
55 55
		mwexec("killall dhcpd", true);
56
		mwexec("killall -9 rtadvd", true);
57
	}
56 58

  
57 59
	/* DHCP enabled on any interfaces? */
58 60
	if (!is_dhcp_server_enabled())
......
630 632
	
631 633

  
632 634
	/* fire up dhcpd in a chroot */
633
	mwexec("/usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpd.conf " .
634
		join(" ", $dhcpdifs));
635
	mwexec("/usr/local/sbin/dhcpd -6 -user dhcpd -group _dhcp -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpdv6.conf " .
636
		join(" ", $dhcpdv6ifs));
635
	if(count($dhcpdifs) > 0) {
636
		mwexec("/usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpd.conf " .
637
			join(" ", $dhcpdifs));
638
	}
637 639

  
640
	if(count($dhcpdv6ifs) > 0) {
641
		mwexec("/usr/local/sbin/dhcpd -6 -user dhcpd -group _dhcp -chroot {$g['dhcpd_chroot_path']} -cf /etc/dhcpdv6.conf " .
642
			join(" ", $dhcpdv6ifs));
643
		mwexec("/usr/sbin/rtadvd " . join(" ", $dhcpdv6ifs));
644
	}
638 645
	if ($g['booting']) {
639 646
		print "done.\n";
640 647
	}

Also available in: Unified diff