/[smecontribs]/rpms/smeserver-dhcpmanager/contribs10/smeserver-dhcpmanager-2.0.4-bz11506-noCustomTemplates.patch
ViewVC logotype

Contents of /rpms/smeserver-dhcpmanager/contribs10/smeserver-dhcpmanager-2.0.4-bz11506-noCustomTemplates.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Wed Mar 31 02:32:09 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-dhcpmanager-2_0_4-12_el7_sme, smeserver-dhcpmanager-2_0_4-11_el7_sme, smeserver-dhcpmanager-2_0_4-13_el7_sme, smeserver-dhcpmanager-2_0_4-16_el7_sme, smeserver-dhcpmanager-2_0_4-15_el7_sme, smeserver-dhcpmanager-2_0_4-18_el7_sme, smeserver-dhcpmanager-2_0_4-17_el7_sme, HEAD
Changes since 1.1: +60 -0 lines
Error occurred while calculating annotation data.
* Tue Mar 30 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.4-11.sme
- removing tmeplate custom, merged with core [SME: 11506]
- adding third DNS entry [SME: 11506]

1 diff -Nur --no-dereference smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/dhcpd smeserver-dhcpmanager-2.0.4/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/dhcpd
2 --- smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/dhcpd 2015-08-17 18:06:47.000000000 -0400
3 +++ smeserver-dhcpmanager-2.0.4/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/dhcpd 2021-03-30 22:30:01.180000000 -0400
4 @@ -80,6 +80,10 @@
5 <trans>Secondary DNS</trans>
6 </entry>
7 <entry>
8 + <base>TERTIARY_DNS_ADDRESS</base>
9 + <trans>Tertiary DNS</trans>
10 + </entry>
11 + <entry>
12 <base>CUSTOM_GATEWAY_TITLE</base>
13 <trans>Enable a custom gateway address.</trans>
14 </entry>
15 diff -Nur --no-dereference smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25DomainNameServers smeserver-dhcpmanager-2.0.4/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25DomainNameServers
16 --- smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25DomainNameServers 2015-08-13 08:43:24.000000000 -0400
17 +++ smeserver-dhcpmanager-2.0.4/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25DomainNameServers 1969-12-31 19:00:00.000000000 -0500
18 @@ -1,22 +0,0 @@
19 -{
20 -
21 - my $dhcpdnscustom = $DB->get_prop('dhcpd', 'dnscustom');
22 - my $dhcpdns1server = $DB->get_prop('dhcpd', 'dns1server');
23 - my $dhcpdns2server = $DB->get_prop('dhcpd', 'dns2server');
24 -
25 - if ($dhcpdnscustom eq 'enabled')
26 - {
27 - if ($dhcpdns2server eq "" )
28 - {
29 - $OUT .= " option domain-name-servers $dhcpdns1server;";
30 - }
31 - else
32 - {
33 - $OUT .= " option domain-name-servers $dhcpdns1server, $dhcpdns2server;";
34 - }
35 - }
36 - else
37 - {
38 - $OUT .= " option domain-name-servers $LocalIP;";
39 - }
40 -}
41 diff -Nur --no-dereference smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25LeaseTimeDefault smeserver-dhcpmanager-2.0.4/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25LeaseTimeDefault
42 --- smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25LeaseTimeDefault 2015-08-13 08:43:24.000000000 -0400
43 +++ smeserver-dhcpmanager-2.0.4/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25LeaseTimeDefault 1969-12-31 19:00:00.000000000 -0500
44 @@ -1,4 +0,0 @@
45 -{
46 - my $dhcpleasetime = $DB->get_prop('dhcpd', 'leasetime') || 86400;
47 - $OUT .= " default-lease-time $dhcpleasetime;";
48 -}
49 diff -Nur --no-dereference smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25LeaseTimeMax smeserver-dhcpmanager-2.0.4/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25LeaseTimeMax
50 --- smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25LeaseTimeMax 2015-08-13 08:43:24.000000000 -0400
51 +++ smeserver-dhcpmanager-2.0.4/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25LeaseTimeMax 1969-12-31 19:00:00.000000000 -0500
52 @@ -1,6 +0,0 @@
53 -{
54 -
55 - my $leasetime = $DB->get_prop('dhcpd', 'leasetime') || 86400;
56 - my $maxleasetime = 7 * $leasetime;
57 - $OUT .= " max-lease-time $maxleasetime;";
58 -}
59 diff -Nur --no-dereference smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25Routers smeserver-dhcpmanager-2.0.4/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25Routers
60 --- smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25Routers 2015-08-13 08:43:24.000000000 -0400
61 +++ smeserver-dhcpmanager-2.0.4/root/etc/e-smith/templates-custom/etc/dhcpd.conf/25Routers 1969-12-31 19:00:00.000000000 -0500
62 @@ -1,21 +0,0 @@
63 -{
64 -
65 - my $dhcpgatewaycustom = $DB->get_prop('dhcpd', 'gatewaycustom');
66 - my $dhcpgateway= $DB->get_prop('dhcpd', 'gateway');
67 - if ($dhcpgatewaycustom eq 'enabled')
68 - {
69 - $OUT .= " option routers $dhcpgateway;";
70 - }
71 - else
72 - {
73 - my $router = (defined $SystemMode && $SystemMode =~ /servergateway/)
74 - ? $LocalIP :
75 - defined $GatewayIP ? $GatewayIP : undef;
76 -
77 - $OUT = "";
78 - if ($router)
79 - {
80 - $OUT .= " option routers $router;";
81 - }
82 - }
83 -}
84 diff -Nur --no-dereference smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/web/functions/dhcpd smeserver-dhcpmanager-2.0.4/root/etc/e-smith/web/functions/dhcpd
85 --- smeserver-dhcpmanager-2.0.4.old/root/etc/e-smith/web/functions/dhcpd 2021-03-30 21:54:50.428000000 -0400
86 +++ smeserver-dhcpmanager-2.0.4/root/etc/e-smith/web/functions/dhcpd 2021-03-30 22:30:01.447000000 -0400
87 @@ -212,6 +212,10 @@
88 $fm->localise('SECONDARY_DNS_ADDRESS'),
89 'dhcp_dns2server',
90 $sme_conf{'dns2server'}),
91 + esmith::cgi::genNameValueRow ($q,
92 + $fm->localise('TERTIARY_DNS_ADDRESS'),
93 + 'dhcp_dns3server',
94 + $sme_conf{'dns3server'}),
95
96 #### Custom default Gateway
97 esmith::cgi::genTextRow ($q,
98 @@ -273,6 +277,7 @@
99 my $dhcpd_dnscustom = $q->param ('dhcp_dnscustom');
100 my $dhcpd_dns1server = $q->param ('dhcp_dns1server');
101 my $dhcpd_dns2server = $q->param ('dhcp_dns2server');
102 + my $dhcpd_dns3server = $q->param ('dhcp_dns3server');
103 my $dhcpd_gatewaycustom = $q->param ('dhcp_gatewaycustom');
104 my $dhcpd_gateway = $q->param ('dhcp_gateway');
105
106 @@ -350,18 +355,20 @@
107 if ($dhcpd_dnscustom eq "enabled")
108 {
109 #check if $dhcpd_dns1server and ( $dhcpd_dns2server are valid ip or $dhcpd_dns2server = null )
110 - if ( isValidIP ($dhcpd_dns1server) && (isValidIP($dhcpd_dns2server) || ( $dhcpd_dns2server eq "") ) )
111 + if ( isValidIP ($dhcpd_dns1server) && (isValidIP($dhcpd_dns2server) || ( $dhcpd_dns2server eq "") ) && (isValidIP($dhcpd_dns3server) || ( $dhcpd_dns3server eq "") ) )
112 {
113 #set value
114 my $dhcpd_dns1server = cleanIP($dhcpd_dns1server);
115 $sme_record->set_prop('dns1server' , $dhcpd_dns1server);
116 my $dhcpd_dns2server = cleanIP($dhcpd_dns2server);
117 $sme_record->set_prop('dns2server' , $dhcpd_dns2server);
118 + my $dhcpd_dns3server = cleanIP($dhcpd_dns3server);
119 + $sme_record->set_prop('dns3server' , $dhcpd_dns3server);
120 }
121 else
122 {
123 - ##if $dhcpd_dns1server or $dhcpd_dns2server are not valid ip then display an error
124 - Main_Display($q, $fm->localise('DNS_SERVER_WITH_BAD_IP') . ' (' . $dhcpd_dns1server . '/' . $dhcpd_dns2server .')');
125 + ##if $dhcpd_dns1server or $dhcpd_dns2server or $dhcpd_dns3server are not valid ip then display an error
126 + Main_Display($q, $fm->localise('DNS_SERVER_WITH_BAD_IP') . ' (' . $dhcpd_dns1server . '/' . $dhcpd_dns2server . '/' . $dhcpd_dns3server .')');
127 }
128 }
129

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed