1 |
brianr |
1.1 |
diff -urN e-smith-base-5.8.1.old/root/etc/e-smith/templates/etc/dhcpd.conf/25DomainNameServers e-smith-base-5.8.1/root/etc/e-smith/templates/etc/dhcpd.conf/25DomainNameServers |
2 |
|
|
--- e-smith-base-5.8.1.old/root/etc/e-smith/templates/etc/dhcpd.conf/25DomainNameServers 2021-06-06 21:30:37.000000000 +0100 |
3 |
|
|
+++ e-smith-base-5.8.1/root/etc/e-smith/templates/etc/dhcpd.conf/25DomainNameServers 2022-12-29 10:02:33.027225656 +0000 |
4 |
|
|
@@ -2,9 +2,9 @@ |
5 |
|
|
my @dnsserv; |
6 |
|
|
my $dnscustom = $DB->get_prop('dhcpd', 'dnscustom') || 'disabled'; |
7 |
|
|
if ( $dnscustom eq 'enabled') { |
8 |
|
|
- push @dnsserv,$DB->get_prop('dhcpd', 'dns1server') if $DB->get_prop('dhcpd', 'dns1server'); |
9 |
|
|
- push @dnsserv,$DB->get_prop('dhcpd', 'dns2server') if $DB->get_prop('dhcpd', 'dns2server'); |
10 |
|
|
- push @dnsserv,$DB->get_prop('dhcpd', 'dns3server') if $DB->get_prop('dhcpd', 'dns3server'); |
11 |
|
|
+ push @dnsserv,$DB->get_prop('dhcpd', 'dns1server') if $DB->get_prop('dhcpd', 'dns1server') && $DB->get_prop('dhcpd', 'dns1server') ne ""; |
12 |
|
|
+ push @dnsserv,$DB->get_prop('dhcpd', 'dns2server') if $DB->get_prop('dhcpd', 'dns2server') && $DB->get_prop('dhcpd', 'dns2server') ne ""; |
13 |
|
|
+ push @dnsserv,$DB->get_prop('dhcpd', 'dns3server') if $DB->get_prop('dhcpd', 'dns3server') && $DB->get_prop('dhcpd', 'dns3server') ne ""; |
14 |
|
|
} |
15 |
|
|
# force our own dhcp server unless there is already 2 or more |
16 |
|
|
push @dnsserv,$LocalIP unless ( scalar(@dnsserv) >=2) ; |
17 |
|
|
@@ -14,3 +14,4 @@ |
18 |
|
|
|
19 |
|
|
$OUT = " option domain-name-servers ". join(",", @dnsserv) .";"; |
20 |
|
|
} |
21 |
|
|
+ |