FreeBSD 9 DHCPd support

This commit is contained in:
Jamie Cameron
2013-03-16 11:11:33 -07:00
parent 78ffb0796c
commit c2ba9b1f49
7 changed files with 35 additions and 3 deletions
+2
View File
@@ -45,3 +45,5 @@ Multiple leases can now be deleted at once, thanks to a suggestion from Berni El
Added a Module Config option to automatically refresh the lease list every few seconds, and a link to force a manual refresh.
---- Changes since 1.560 ----
Added a client option for subnets and groups for DNS domains to search.
---- Changes since 1.620 ----
Improved support for interface configuration and startup commands as used on FreeBSD 9.
+16
View File
@@ -0,0 +1,16 @@
dhcpd_conf=/usr/local/etc/dhcpd.conf
pid_file=/var/run/dhcpd.pid
dhcpd_path=/usr/local/sbin/dhcpd
lease_file=/var/db/dhcpd.leases
lease_sort=0
dhcpd_nocols=5
lease_tz=0
show_ip=0
show_mac=0
group_name=0
display_max=100
desc_name=0
interfaces_type=freebsd
start_cmd=/usr/local/etc/rc.d/isc-dhcpd forcestart
stop_cmd=/usr/local/etc/rc.d/isc-dhcpd forcestop
restart_cmd=/usr/local/etc/rc.d/isc-dhcpd onerestart
+1 -1
View File
@@ -18,5 +18,5 @@ restart_cmd=Command to apply configuration,3,Kill and re-start
stop_cmd=Command to stop DHCP server,3,Kill process
pid_file=Path to DHCP server PID file,3,None
lease_file=DHCP server lease file,0
interfaces_type=Interfaces file type,4,redhat-Redhat,mandrake-Mandrake,suse-SuSE,debian-Debian,caldera-Caldera,gentoo-Gentoo,-Webmin
interfaces_type=Interfaces file type,4,redhat-Redhat,mandrake-Mandrake,suse-SuSE,debian-Debian,caldera-Caldera,gentoo-Gentoo,freebsd-FreeBSD,-Webmin
version=DHCP server version,3,Work out automatically
+9
View File
@@ -73,6 +73,15 @@ elsif ($config{'interfaces_type'} eq 'gentoo') {
&read_env_file("/etc/conf.d/dhcp", \%dhcp);
$iface = $dhcp{'IFACE'};
}
elsif ($config{'interfaces_type'} eq 'freebsd') {
# From FreeBSD rc.conf file
&foreign_require("init");
my $rcconf = &init::get_rc_conf();
my ($c) = grep { $_->{'name'} eq 'dhcpd_ifaces' } @$rcconf;
if ($c) {
$iface = $c->{'value'};
}
}
else {
# Just use the configuration
$iface = $config{'interfaces'};
+5
View File
@@ -98,6 +98,11 @@ elsif ($config{'interfaces_type'} eq 'gentoo') {
$dhcp{'IFACE'} = $iface;
&write_env_file("/etc/conf.d/dhcp", \%dhcp);
}
elsif ($config{'interfaces_type'} eq 'freebsd') {
# Update FreeBSD rc.conf file
&foreign_require("init");
&init::save_rc_conf('dhcpd_ifaces', $iface);
}
&redirect("");
+1 -1
View File
@@ -2,7 +2,7 @@ desc=Software Package Updates
longdesc=Displays available package updates from YUM, APT or other update systems
category=system
depends=software cron mailboxes
os_support=redhat-linux debian-linux mandrake-linux/10.2-* solaris
os_support=redhat-linux debian-linux mandrake-linux/10.2-* solaris freebsd
desc_ca=Actualitzacions de Paquets de Programes
desc_ru.UTF-8=Обновление программных пакетов
desc_nl=Software pakketten Update
+1 -1
View File
@@ -98,7 +98,7 @@ sub update_system_resolve
{
local ($name) = @_;
return $name eq "apache" ? "apache22 ap22-mod_.*" :
$name eq "dhcpd" ? "isc-dhcp-42-server" :
$name eq "dhcpd" ? "isc-dhcp42-server" :
$name eq "mysql" ? "mysql-server" :
$name eq "openssh" ? "openssh-portable" :
$name eq "postgresql" ? "postgresql-server" :