]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - html/cgi-bin/pppsetup.cgi
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007-2014 IPFire Team <info@ipfire.org> #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
24 # enable only the following on debugging purpose
26 #use CGI::Carp 'fatalsToBrowser';
28 require '/var/ipfire/general-functions.pl';
29 require "${General::swroot}/lang.pl";
30 require "${General::swroot}/header.pl";
33 my %temppppsettings=();
34 our %modemsettings=();
40 my $errormessage = '';
42 my $kernel=`/bin/uname -r | /usr/bin/tr -d '\012'`;
45 my %mainsettings = ();
46 &General
::readhash
("${General::swroot}/main/settings", \
%mainsettings);
47 &General
::readhash
("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \
%color);
49 &Header
::showhttpheaders
();
51 $pppsettings{'ACTION'} = '';
53 &Header
::getcgihash
(\
%pppsettings);
55 if ($pppsettings{'ACTION'} ne '' &&
56 ( -e
"${General::swroot}/red/active")){
57 $errormessage = $Lang::tr
{'unable to alter profiles while red is active'};
58 # read in the current vars
60 $pppsettings{'VALID'} = '';
61 &General
::readhash
("${General::swroot}/ppp/settings", \
%pppsettings);}
62 elsif ($pppsettings{'ACTION'} eq $Lang::tr
{'refresh'})
64 unless ($pppsettings{'TYPE'} =~ /^(modem|serial|isdn|pppoe|pptp|vdsl|pppoeatm|pptpatm)$/) {
65 $errormessage = $Lang::tr
{'invalid input'};
67 my $type = $pppsettings{'TYPE'};
68 &General
::readhash
("${General::swroot}/ppp/settings", \
%pppsettings);
69 $pppsettings{'TYPE'} = $type;
71 elsif ($pppsettings{'ACTION'} eq $Lang::tr
{'save'})
73 if ($pppsettings{'TYPE'} =~ /^(modem|serial|isdn)$/ && $pppsettings{'COMPORT'} !~ /^(ttyS0|ttyS1|ttyS2|ttyS3|ttyS4|ttyACM[0-9]|ttyUSB[0-9]|rfcomm0|rfcomm1|isdn1|isdn2)$/) {
74 $errormessage = $Lang::tr
{'invalid input'};
76 if ($pppsettings{'TYPE'} =~ /^(modem|serial|isdn)$/ && $pppsettings{'MONPORT'} !~ /^(|ttyACM[0-9]|ttyUSB[0-9]|rfcomm0|rfcomm1)$/) {
77 $errormessage = $Lang::tr
{'invalid input'};
79 if ($pppsettings{'TYPE'} =~ /^(modem|serial)$/ && $pppsettings{'DTERATE'} !~ /^(9600|19200|38400|57600|115200|230400|460800|921600)$/) {
80 $errormessage = $Lang::tr
{'invalid input'};
82 if ($pppsettings{'TYPE'} eq 'modem' && $pppsettings{'DIALMODE'} !~ /^(T|P)$/) {
83 $errormessage = $Lang::tr
{'invalid input'};
85 if ($pppsettings{'AUTH'} !~ /^(pap-or-chap|pap|chap|standard-login-script|demon-login-script|other-login-script)$/) {
86 $errormessage = $Lang::tr
{'invalid input'};
90 if ($pppsettings{'PROFILENAME'} eq '') {
91 $errormessage = $Lang::tr
{'profile name not given'};
92 $pppsettings{'PROFILENAME'} = '';
94 if ($pppsettings{'TYPE'} =~ /^(modem|isdn)$/) {
95 if ($pppsettings{'TELEPHONE'} eq '') {
96 $errormessage = $Lang::tr
{'telephone not set'};
98 if (!($pppsettings{'TELEPHONE'} =~ /^[\d\*\#\,]+$/)) {
99 $errormessage = $Lang::tr
{'bad characters in the telephone number field'};
102 unless (($pppsettings{'PROTOCOL'} eq 'RFC1483' && $pppsettings{'METHOD'} =~ /^(STATIC|DHCP)$/)) {
103 if ($pppsettings{'USERNAME'} eq '') {
104 $errormessage = $Lang::tr
{'username not set'};
108 if ($pppsettings{'TIMEOUT'} eq '') {
109 $errormessage = $Lang::tr
{'idle timeout not set'};
111 if (!($pppsettings{'TIMEOUT'} =~ /^\d+$/)) {
112 $errormessage = $Lang::tr
{'only digits allowed in the idle timeout'};
115 if ($pppsettings{'LOGINSCRIPT'} =~ /[.\/ ]/ ) {
116 $errormessage = $Lang::tr
{'bad characters in script field'};
119 if ($pppsettings{'MAXRETRIES'} eq '') {
120 $errormessage = $Lang::tr
{'max retries not set'};
122 if (!($pppsettings{'MAXRETRIES'} =~ /^\d+$/)) {
123 $errormessage = $Lang::tr
{'only digits allowed in max retries field'};
126 if (!($pppsettings{'HOLDOFF'} =~ /^\d+$/)) {
127 $errormessage = $Lang::tr
{'only digits allowed in holdoff field'};
130 if ($pppsettings{'TYPE'} =~ /^(pppoeatm|pptpatm)$/) {
131 if ( ($pppsettings{'VPI'} eq '') || ($pppsettings{'VCI'} eq '') ) {
132 $errormessage = $Lang::tr
{'invalid vpi vpci'};
134 if ( (!($pppsettings{'VPI'} =~ /^\d+$/)) || (!($pppsettings{'VCI'} =~ /^\d+$/)) ) {
135 $errormessage = $Lang::tr
{'invalid vpi vpci'};
137 if (($pppsettings{'VPI'} eq '0') && ($pppsettings{'VCI'} eq '0')) {
138 $errormessage = $Lang::tr
{'invalid vpi vpci'};
140 if ($pppsettings{'ATM_DEV'} eq '') {
141 $errormessage = $Lang::tr
{'invalid input'};
143 if ( $pppsettings{'PROTOCOL'} eq '' ) {
144 $errormessage = $Lang::tr
{'invalid input'};
148 if ( ($pppsettings{'PROTOCOL'} eq 'RFC1483') && ($pppsettings{'METHOD'} eq '') && \
149 ($pppsettings{'TYPE'} !~ /^(alcatelusb|fritzdsl)$/)) {
150 $errormessage = $Lang::tr
{'invalid input'};
153 if (($pppsettings{'PROTOCOL'} eq 'RFC1483' && $pppsettings{'METHOD'} eq 'DHCP')) {
154 if ($pppsettings{'DHCP_HOSTNAME'} ne '') {
155 if (! &General
::validfqdn
($pppsettings{'DHCP_HOSTNAME'})) {
156 $errormessage = $errormessage.' '.$Lang::tr
{'hostname'}.': '.$Lang::tr
{'invalid hostname'}; }
160 if (($pppsettings{'PROTOCOL'} eq 'RFC1483' && $pppsettings{'METHOD'} eq 'STATIC')) {
162 if (! &General
::validip
($pppsettings{'IP'})) {
163 $errormessage = $Lang::tr
{'static ip'}.' '.$Lang::tr
{'invalid ip'}; }
164 if (! &General
::validip
($pppsettings{'GATEWAY'})) {
165 $errormessage = $errormessage.' '.$Lang::tr
{'gateway ip'}.' '.$Lang::tr
{'invalid ip'}; }
166 if (! &General
::validmask
($pppsettings{'NETMASK'})) {
167 $errormessage = $errormessage.' '.$Lang::tr
{'netmask'}.' '.$Lang::tr
{'invalid netmask'}; }
168 if ($pppsettings{'BROADCAST'} ne '') {
169 if (! &General
::validip
($pppsettings{'BROADCAST'})) {
170 $errormessage = $errormessage.' '.$Lang::tr
{'broadcast'}.' '.$Lang::tr
{'invalid broadcast ip'}; }
172 if ($errormessage ne '') {goto ERROR
; }
175 if( $pppsettings{'PROTOCOL'} eq 'RFC1483' && $pppsettings{'METHOD'} ne 'PPPOE' && \
176 $pppsettings{'RECONNECTION'} eq 'dialondemand' ) {
177 $errormessage = $Lang::tr
{'invalid input'};
180 if( $pppsettings{'RECONNECTION'} eq 'dialondemand' && `/bin/cat ${General::swroot}/ddns/config` =~ /,on$/m ) {
181 $errormessage = $Lang::tr
{'dod not compatible with ddns'};
184 # if( $pppsettings{'PROTOCOL'} eq 'RFC1483') {
185 # $pppsettings{'ENCAP'} = $pppsettings{'ENCAP_RFC1483'}; }
186 # if( $pppsettings{'PROTOCOL'} eq 'RFC2364') {
187 # $pppsettings{'ENCAP'} = $pppsettings{'ENCAP_RFC2364'}; }
188 delete $pppsettings{'ENCAP_RFC1483'};
189 delete $pppsettings{'ENCAP_RFC2364'};
191 if ((!($pppsettings{'INET_VLAN'} =~ /^\d+$/)) ||
192 ($pppsettings{'INET_VLAN'} eq '') ||
193 ($pppsettings{'INET_VLAN'} > 4095) ) {
194 $errormessage = 'INET_VLAN - '.$Lang::tr
{'invalid input'}; }
196 if ((!($pppsettings{'IPTV_VLAN'} =~ /^\d+$/)) ||
197 ($pppsettings{'IPTV_VLAN'} eq '') ||
198 ($pppsettings{'IPTV_VLAN'} > 4095) ) {
199 $errormessage = 'IPTV_VLAN - '.$Lang::tr
{'invalid input'}; }
203 $pppsettings{'VALID'} = 'no'; }
205 $pppsettings{'VALID'} = 'yes'; }
207 # write cgi vars to the file.
208 &General
::writehash
("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}",
211 # make link and write secret file.
215 &General
::log("$Lang::tr{'profile saved'} $pppsettings{'PROFILENAME'}");
217 if ($pppsettings{'ACTION'} eq $Lang::tr
{'select'})
219 my $profile = $pppsettings{'PROFILE'};
220 %temppppsettings = ();
221 $temppppsettings{'PROFILE'} = '';
222 &General
::readhash
("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}",
228 # read in the new params "early" so we can write secrets.
230 &General
::readhash
("${General::swroot}/ppp/settings", \
%pppsettings);
231 $pppsettings{'PROFILE'} = $profile;
232 &General
::writehash
("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}",
237 &General
::log("$Lang::tr{'profile made current'} $pppsettings{'PROFILENAME'}");
239 elsif ($pppsettings{'ACTION'} eq $Lang::tr
{'delete'})
241 &General
::log("$Lang::tr{'profile deleted'} $pppsettings{'PROFILENAME'}");
243 my $profile = $pppsettings{'PROFILE'};
244 truncate ("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}", 0);
246 %temppppsettings = ();
247 $temppppsettings{'PROFILE'} = '';
248 &General
::readhash
("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}",
254 # read in the new params "early" so we can write secrets.
256 &General
::readhash
("${General::swroot}/ppp/settings", \
%pppsettings);
257 $pppsettings{'PROFILE'} = $profile;
259 &General
::writehash
("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}",
262 elsif ($pppsettings{'ACTION'} eq $Lang::tr
{'refresh'})
267 # read in the current vars
269 $pppsettings{'VALID'} = '';
270 &General
::readhash
("${General::swroot}/ppp/settings", \
%pppsettings);
273 # read in the profile names into @profilenames.
275 for ($c = 1; $c <= $maxprofiles; $c++)
277 %temppppsettings = ();
278 $temppppsettings{'PROFILENAME'} = $Lang::tr
{'empty profile'};
279 &General
::readhash
("${General::swroot}/ppp/settings-$c", \
%temppppsettings);
280 $profilenames[$c] = $temppppsettings{'PROFILENAME'};
283 if ($pppsettings{'VALID'} eq '')
285 if ($pppsettings{'PROFILE'} eq '') {
286 $pppsettings{'PROFILE'} = '1';
290 for ($c = 1; $c <= $maxprofiles; $c++) {
291 $selected{'PROFILE'}{$c} = ''; }
292 $selected{'PROFILE'}{$pppsettings{'PROFILE'}} = "selected='selected'";
293 for ($c = 1; $c <= $maxprofiles; $c++) {
294 $selected{'BACKUPPROFILE'}{$c} = ''; }
295 $selected{'BACKUPPROFILE'}{$pppsettings{'BACKUPPROFILE'}} = "selected='selected'";
297 $selected{'TYPE'}{'modem'} = '';
298 $selected{'TYPE'}{'serial'} = '';
299 $selected{'TYPE'}{'pppoe'} = '';
300 $selected{'TYPE'}{'pptp'} = '';
301 $selected{'TYPE'}{'vdsl'} = '';
302 $selected{'TYPE'}{'pppoeatm'} = '';
303 $selected{'TYPE'}{'pptpatm'} = '';
304 $selected{'TYPE'}{$pppsettings{'TYPE'}} = "selected='selected'";
305 $checked{'DEBUG'}{'off'} = '';
306 $checked{'DEBUG'}{'on'} = '';
307 $checked{'DEBUG'}{$pppsettings{'DEBUG'}} = "checked='checked'";
309 $selected{'COMPORT'}{'ttyS0'} = '';
310 $selected{'COMPORT'}{'ttyS1'} = '';
311 $selected{'COMPORT'}{'ttyS2'} = '';
312 $selected{'COMPORT'}{'ttyS3'} = '';
313 $selected{'COMPORT'}{'ttyS4'} = '';
314 $selected{'COMPORT'}{'ttyACM0'} = '';
315 $selected{'COMPORT'}{'ttyACM1'} = '';
316 $selected{'COMPORT'}{'ttyACM2'} = '';
317 $selected{'COMPORT'}{'ttyACM3'} = '';
318 $selected{'COMPORT'}{'ttyACM4'} = '';
319 $selected{'COMPORT'}{'ttyACM5'} = '';
320 $selected{'COMPORT'}{'ttyACM6'} = '';
321 $selected{'COMPORT'}{'ttyACM7'} = '';
322 $selected{'COMPORT'}{'ttyACM8'} = '';
323 $selected{'COMPORT'}{'ttyACM9'} = '';
324 $selected{'COMPORT'}{'ttyUSB0'} = '';
325 $selected{'COMPORT'}{'ttyUSB1'} = '';
326 $selected{'COMPORT'}{'ttyUSB2'} = '';
327 $selected{'COMPORT'}{'ttyUSB3'} = '';
328 $selected{'COMPORT'}{'ttyUSB4'} = '';
329 $selected{'COMPORT'}{'ttyUSB5'} = '';
330 $selected{'COMPORT'}{'ttyUSB6'} = '';
331 $selected{'COMPORT'}{'ttyUSB7'} = '';
332 $selected{'COMPORT'}{'ttyUSB8'} = '';
333 $selected{'COMPORT'}{'ttyUSB9'} = '';
334 $selected{'COMPORT'}{'rfcomm0'} = '';
335 $selected{'COMPORT'}{'rfcomm1'} = '';
336 $selected{'COMPORT'}{$pppsettings{'COMPORT'}} = "selected='selected'";
338 $selected{'MONPORT'}{''} = '';
339 $selected{'MONPORT'}{'ttyACM0'} = '';
340 $selected{'MONPORT'}{'ttyACM1'} = '';
341 $selected{'MONPORT'}{'ttyACM2'} = '';
342 $selected{'MONPORT'}{'ttyACM3'} = '';
343 $selected{'MONPORT'}{'ttyACM4'} = '';
344 $selected{'MONPORT'}{'ttyACM5'} = '';
345 $selected{'MONPORT'}{'ttyACM6'} = '';
346 $selected{'MONPORT'}{'ttyACM7'} = '';
347 $selected{'MONPORT'}{'ttyACM8'} = '';
348 $selected{'MONPORT'}{'ttyACM9'} = '';
349 $selected{'MONPORT'}{'ttyUSB0'} = '';
350 $selected{'MONPORT'}{'ttyUSB1'} = '';
351 $selected{'MONPORT'}{'ttyUSB2'} = '';
352 $selected{'MONPORT'}{'ttyUSB3'} = '';
353 $selected{'MONPORT'}{'ttyUSB4'} = '';
354 $selected{'MONPORT'}{'ttyUSB5'} = '';
355 $selected{'MONPORT'}{'ttyUSB6'} = '';
356 $selected{'MONPORT'}{'ttyUSB7'} = '';
357 $selected{'MONPORT'}{'ttyUSB8'} = '';
358 $selected{'MONPORT'}{'ttyUSB9'} = '';
359 $selected{'MONPORT'}{'rfcomm0'} = '';
360 $selected{'MONPORT'}{'rfcomm1'} = '';
361 $selected{'MONPORT'}{$pppsettings{'MONPORT'}} = "selected='selected'";
363 $selected{'DTERATE'}{'9600'} = '';
364 $selected{'DTERATE'}{'19200'} = '';
365 $selected{'DTERATE'}{'38400'} = '';
366 $selected{'DTERATE'}{'57600'} = '';
367 $selected{'DTERATE'}{'115200'} = '';
368 $selected{'DTERATE'}{'230400'} = '';
369 $selected{'DTERATE'}{'460800'} = '';
370 $selected{'DTERATE'}{'921600'} = '';
371 $selected{'DTERATE'}{$pppsettings{'DTERATE'}} = "selected='selected'";
373 $checked{'SPEAKER'}{'off'} = '';
374 $checked{'SPEAKER'}{'on'} = '';
375 $checked{'SPEAKER'}{$pppsettings{'SPEAKER'}} = "checked='checked'";
377 $selected{'DIALMODE'}{'T'} = '';
378 $selected{'DIALMODE'}{'P'} = '';
379 $selected{'DIALMODE'}{$pppsettings{'DIALMODE'}} = "selected='selected'";
381 $checked{'RECONNECTION'}{'persistent'} = '';
382 $checked{'RECONNECTION'}{'dialondemand'} = '';
383 $checked{'RECONNECTION'}{$pppsettings{'RECONNECTION'}} = "checked='checked'";
385 $checked{'DIALONDEMANDDNS'}{'off'} = '';
386 $checked{'DIALONDEMANDDNS'}{'on'} = '';
387 $checked{'DIALONDEMANDDNS'}{$pppsettings{'DIALONDEMANDDNS'}} = "checked='checked'";
389 $checked{'AUTOCONNECT'}{'off'} = '';
390 $checked{'AUTOCONNECT'}{'on'} = '';
391 $checked{'AUTOCONNECT'}{$pppsettings{'AUTOCONNECT'}} = "checked='checked'";
393 $checked{'SENDCR'}{'off'} = '';
394 $checked{'SENDCR'}{'on'} = '';
395 $checked{'SENDCR'}{$pppsettings{'SENDCR'}} = "checked='checked'";
396 $checked{'USEDOV'}{'off'} = '';
397 $checked{'USEDOV'}{'on'} = '';
398 $checked{'USEDOV'}{$pppsettings{'USEDOV'}} = "checked='checked'";
400 $checked{'MODEM'}{'PCIST'} = '';
401 $checked{'MODEM'}{'USB'} = '';
402 $checked{'MODEM'}{$pppsettings{'MODEM'}} = "checked='checked'";
404 $selected{'LINE'}{'WO'} = '';
405 $selected{'LINE'}{'ES'} = '';
406 $selected{'LINE'}{'ES03'} = '';
407 $selected{'LINE'}{'FR'} = '';
408 $selected{'LINE'}{'FR04'} = '';
409 $selected{'LINE'}{'FR10'} = '';
410 $selected{'LINE'}{'IT'} = '';
411 $selected{'LINE'}{$pppsettings{'LINE'}} = "selected='selected'";
413 $checked{'MODULATION'}{'GDMT'} = '';
414 $checked{'MODULATION'}{'ANSI'} = '';
415 $checked{'MODULATION'}{'GLITE'} = '';
416 $checked{'MODULATION'}{'AUTO'} = '';
417 $checked{'MODULATION'}{$pppsettings{'MODULATION'}} = "checked='checked'";
419 $checked{'PROTOCOL'}{'RFC1483'} = '';
420 $checked{'PROTOCOL'}{'RFC2364'} = '';
421 $checked{'PROTOCOL'}{$pppsettings{'PROTOCOL'}} = "checked='checked'";
423 $selected{'ENCAP'}{'0'} = '';
424 $selected{'ENCAP'}{'1'} = '';
425 #$selected{'ENCAP'}{'2'} = '';
426 #$selected{'ENCAP'}{'3'} = '';
427 #$selected{'ENCAP'}{'4'} = '';
428 $selected{'ENCAP'}{$pppsettings{'ENCAP'}} = "selected='selected'";
430 $checked{'METHOD'}{'STATIC'} = '';
431 $checked{'METHOD'}{'PPPOE'} = '';
432 $checked{'METHOD'}{'DHCP'} = '';
433 $checked{'METHOD'}{$pppsettings{'METHOD'}} = "checked='checked'";
435 $selected{'AUTH'}{'pap-or-chap'} = '';
436 $selected{'AUTH'}{'pap'} = '';
437 $selected{'AUTH'}{'chap'} = '';
438 $selected{'AUTH'}{'standard-login-script'} = '';
439 $selected{'AUTH'}{'demon-login-script'} = '';
440 $selected{'AUTH'}{'other-login-script'} = '';
441 $selected{'AUTH'}{$pppsettings{'AUTH'}} = "selected='selected'";
443 $checked{'IPTV'}{'enable'} = '';
444 $checked{'IPTV'}{'disable'} = '';
445 $checked{'IPTV'}{$pppsettings{'IPTV'}} = "checked='checked'";
447 if ($pppsettings{'INET_VLAN'} eq '') { $pppsettings{'INET_VLAN'}='7'; }
448 if ($pppsettings{'IPTV_VLAN'} eq '') { $pppsettings{'IPTV_VLAN'}='8'; }
450 &Header
::openpage
($Lang::tr
{'ppp setup'}, 1, '');
451 &Header
::openbigbox
('100%', 'left', '', $errormessage);
453 if ($netsettings{'RED_TYPE'} ne 'PPPOE') {
454 $errormessage = $Lang::tr
{'dialup red not ppp'};
455 &Header
::openbox
('100%', 'center', $Lang::tr
{'error messages'});
456 print "<class name='base'>$errormessage\n";
457 print " </class>\n";
459 &Header
::closebigbox
();
461 &Header
::closepage
();
466 &Header
::openbox
('100%', 'center', $Lang::tr
{'error messages'});
467 print "<class name='base'>$errormessage\n";
468 print " </class>\n";
474 ### Box for selecting profile
476 print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n";
477 &Header
::openbox
('100%', 'center', $Lang::tr
{'profile'});
479 <table width='95%' cellspacing='0'>
481 <td align='left'>$Lang::tr{'profile'}</td>
483 <select name='PROFILE' style="width: 165px">
486 for ($c = 1; $c <= $maxprofiles; $c++)
488 print "\t<option value='$c' $selected{'PROFILE'}{$c}>$c. $profilenames[$c]</option>\n";
492 <td align='left'><input type='submit' name='ACTION' value='$Lang::tr{'select'}' /></td>
493 <td align='left'><input type='submit' name='ACTION' value='$Lang::tr{'delete'}' /></td>
494 <td align='left'><input type='submit' name='ACTION' value='$Lang::tr{'restore'}' /></td>
503 &Header
::openbox
('100%', 'center', $Lang::tr
{'connection'});
506 <table width='95%' cellspacing='0'>
508 <td width='25%'>$Lang::tr{'interface'}:</td>
510 <select name='TYPE' style="width: 165px">
513 if ($netsettings{'RED_TYPE'} eq 'PPPOE' ) {
515 <option value='modem' $selected{'TYPE'}{'modem'}>$Lang::tr{'modem'}</option>
516 <option value='serial' $selected{'TYPE'}{'serial'}>$Lang::tr{'serial'}</option>
517 <option value='pppoe' $selected{'TYPE'}{'pppoe'}>PPPoE</option>
518 <option value='pptp' $selected{'TYPE'}{'pptp'}>PPTP</option>
519 <option value='vdsl' $selected{'TYPE'}{'vdsl'}>VDSL</option>
523 my $atmdev=`cat /proc/net/atm/devices 2>/dev/null | grep 0`;
527 <option value='pppoeatm' $selected{'TYPE'}{'pppoeatm'}>PPPoE over ATM-BRIDGE</option>
528 <option value='pptpatm' $selected{'TYPE'}{'pptpatm'}>PPTP over ATM-BRIDGE</option>
535 # <option value='eciadsl' $selected{'TYPE'}{'eciadsl'}>ECI USB ADSL</option>
536 # <option value='eagleusbadsl' $selected{'TYPE'}{'eagleusbadsl'}>Eagle USB ADSL (Acer Allied-Telesyn Comtrend D-Link Sagem USR)</option>
537 # <option value='conexantusbadsl' $selected{'TYPE'}{'conexantusbadsl'}>Conexant USB(Aetra Amigo Draytek Etec Mac Olitec Vitelcom Zoom)</option>
538 # <option value='amedynusbadsl' $selected{'TYPE'}{'amedynusbadsl'}>Zyxel 630-11 / Asus AAM6000UG USB ADSL</option>
539 # <option value='3cp4218usbadsl' $selected{'TYPE'}{'3cp4218usbadsl'}>3Com USB AccessRunner</option>
540 # <option value='alcatelusb' $selected{'TYPE'}{'alcatelusb'}>Speedtouch USB ADSL user mode driver</option>
541 # <option value='alcatelusbk' $selected{'TYPE'}{'alcatelusbk'}>Speedtouch USB ADSL kernel mode driver</option>
545 # print "<option value='fritzdsl' $selected{'TYPE'}{'fritzdsl'}>Fritz!DSL</option>";
549 <td colspan='1' width='25%'><input type='submit' name='ACTION' value='$Lang::tr{'refresh'}'></td>
552 if ($pppsettings{'TYPE'} =~ /^(modem)$/) {
554 <td colspan='1' width='25%'><a href='modem.cgi'>$Lang::tr{'modem configuration'}</a></td>
561 #if (-f "/proc/bus/usb/devices") {
562 # <td colspan='2' width='50%'>USB:</td>
563 # my $usb=`lsmod | cut -d ' ' -f1 | grep -E "hci"`;
565 # print "\t<td colspan='2' width='50%'>$Lang::tr{'not running'}</td></tr>\n";
567 # print "\t<td colspan='2' width='50%'>$usb</td></tr>\n";
571 if ($pppsettings{'TYPE'}) {
572 print "<tr><td colspan='4' width='100%'><br></br></td></tr>";
574 if ($pppsettings{'TYPE'} =~ /^(modem|serial)$/) {
578 <td colspan='3' width='75%'>$Lang::tr{'interface'}:</td>
579 <td width='25%'><select name='COMPORT' style="width: 165px">
582 if ($pppsettings{'TYPE'} =~ /^(modem|serial)$/ ) {
584 <option value='ttyS0' $selected{'COMPORT'}{'ttyS0'}>COM1</option>
585 <option value='ttyS1' $selected{'COMPORT'}{'ttyS1'}>COM2</option>
586 <option value='ttyS2' $selected{'COMPORT'}{'ttyS2'}>COM3</option>
587 <option value='ttyS3' $selected{'COMPORT'}{'ttyS3'}>COM4</option>
588 <option value='ttyS4' $selected{'COMPORT'}{'ttyS4'}>COM5</option>
589 <option value='ttyUSB0' $selected{'COMPORT'}{'ttyUSB0'}>ttyUSB0</option>
590 <option value='ttyUSB1' $selected{'COMPORT'}{'ttyUSB1'}>ttyUSB1</option>
591 <option value='ttyUSB2' $selected{'COMPORT'}{'ttyUSB2'}>ttyUSB2</option>
592 <option value='ttyUSB3' $selected{'COMPORT'}{'ttyUSB3'}>ttyUSB3</option>
593 <option value='ttyUSB4' $selected{'COMPORT'}{'ttyUSB4'}>ttyUSB4</option>
594 <option value='ttyUSB5' $selected{'COMPORT'}{'ttyUSB5'}>ttyUSB5</option>
595 <option value='ttyUSB6' $selected{'COMPORT'}{'ttyUSB6'}>ttyUSB6</option>
596 <option value='ttyUSB7' $selected{'COMPORT'}{'ttyUSB7'}>ttyUSB7</option>
597 <option value='ttyUSB8' $selected{'COMPORT'}{'ttyUSB8'}>ttyUSB8</option>
598 <option value='ttyUSB9' $selected{'COMPORT'}{'ttyUSB9'}>ttyUSB9</option>
599 <option value='rfcomm0' $selected{'COMPORT'}{'rfcomm0'}>rfcomm0 (bluetooth)</option>
600 <option value='rfcomm1' $selected{'COMPORT'}{'rfcomm1'}>rfcomm1 (bluetooth)</option>
603 if ($pppsettings{'TYPE'} ne 'serial' ) {
605 <option value='ttyACM0' $selected{'COMPORT'}{'ttyACM0'}>ttyACM0</option>
606 <option value='ttyACM1' $selected{'COMPORT'}{'ttyACM1'}>ttyACM1</option>
607 <option value='ttyACM2' $selected{'COMPORT'}{'ttyACM2'}>ttyACM2</option>
608 <option value='ttyACM3' $selected{'COMPORT'}{'ttyACM3'}>ttyACM3</option>
609 <option value='ttyACM4' $selected{'COMPORT'}{'ttyACM4'}>ttyACM4</option>
610 <option value='ttyACM5' $selected{'COMPORT'}{'ttyACM5'}>ttyACM5</option>
611 <option value='ttyACM6' $selected{'COMPORT'}{'ttyACM6'}>ttyACM6</option>
612 <option value='ttyACM7' $selected{'COMPORT'}{'ttyACM7'}>ttyACM7</option>
613 <option value='ttyACM8' $selected{'COMPORT'}{'ttyACM8'}>ttyACM8</option>
614 <option value='ttyACM9' $selected{'COMPORT'}{'ttyACM9'}>ttyACM9</option>
618 print "</select></td> "}
620 if ($pppsettings{'TYPE'} =~ /^(modem|serial)$/) {
623 <td colspan='3' width='75%'>$Lang::tr{'monitor interface'}:</td>
625 <select name="MONPORT" style="width: 165px;">
626 <option value="" $selected{'MONPORT'}{''}>---</option>
627 <option value="ttyUSB0" $selected{'MONPORT'}{'ttyUSB0'}>ttyUSB0</option>
628 <option value="ttyUSB1" $selected{'MONPORT'}{'ttyUSB1'}>ttyUSB1</option>
629 <option value="ttyUSB2" $selected{'MONPORT'}{'ttyUSB2'}>ttyUSB2</option>
630 <option value="ttyUSB3" $selected{'MONPORT'}{'ttyUSB3'}>ttyUSB3</option>
631 <option value="ttyUSB4" $selected{'MONPORT'}{'ttyUSB4'}>ttyUSB4</option>
632 <option value="ttyUSB5" $selected{'MONPORT'}{'ttyUSB5'}>ttyUSB5</option>
633 <option value="ttyUSB6" $selected{'MONPORT'}{'ttyUSB6'}>ttyUSB6</option>
634 <option value="ttyUSB7" $selected{'MONPORT'}{'ttyUSB7'}>ttyUSB7</option>
635 <option value="ttyUSB8" $selected{'MONPORT'}{'ttyUSB8'}>ttyUSB8</option>
636 <option value="ttyUSB9" $selected{'MONPORT'}{'ttyUSB9'}>ttyUSB9</option>
637 <option value="rfcomm0" $selected{'COMPORT'}{'rfcomm0'}>rfcomm0 (bluetooth)</option>
638 <option value="rfcomm1" $selected{'COMPORT'}{'rfcomm1'}>rfcomm1 (bluetooth)</option>
639 <option value="ttyACM0" $selected{'COMPORT'}{'ttyACM0'}>ttyACM0</option>
640 <option value="ttyACM1" $selected{'COMPORT'}{'ttyACM1'}>ttyACM1</option>
641 <option value="ttyACM2" $selected{'COMPORT'}{'ttyACM2'}>ttyACM2</option>
642 <option value="ttyACM3" $selected{'COMPORT'}{'ttyACM3'}>ttyACM3</option>
643 <option value="ttyACM4" $selected{'COMPORT'}{'ttyACM4'}>ttyACM4</option>
644 <option value="ttyACM5" $selected{'COMPORT'}{'ttyACM5'}>ttyACM5</option>
645 <option value="ttyACM6" $selected{'COMPORT'}{'ttyACM6'}>ttyACM6</option>
646 <option value="ttyACM7" $selected{'COMPORT'}{'ttyACM7'}>ttyACM7</option>
647 <option value="ttyACM8" $selected{'COMPORT'}{'ttyACM8'}>ttyACM8</option>
648 <option value="ttyACM9" $selected{'COMPORT'}{'ttyACM9'}>ttyACM9</option>
655 if ($pppsettings{'TYPE'} =~ /^(modem|serial)$/ ) {
658 <td colspan='3' width='75%'>$Lang::tr{'computer to modem rate'}</td>
659 <td width='25%'><select name='DTERATE' style="width: 165px">
660 <option value='9600' $selected{'DTERATE'}{'9600'}>9600</option>
661 <option value='19200' $selected{'DTERATE'}{'19200'}>19200</option>
662 <option value='38400' $selected{'DTERATE'}{'38400'}>38400</option>
663 <option value='57600' $selected{'DTERATE'}{'57600'}>57600</option>
664 <option value='115200' $selected{'DTERATE'}{'115200'}>115200</option>
665 <option value='230400' $selected{'DTERATE'}{'230400'}>230400</option>
666 <option value='460800' $selected{'DTERATE'}{'460800'}>460800</option>
667 <option value='921600' $selected{'DTERATE'}{'921600'}>921600</option>
673 if ($pppsettings{'TYPE'} =~ /^(modem)$/ ) {
674 print "<tr><td colspan='3' width='75%'>$Lang::tr{'number'} <img src='/blob.gif' alt='*' /></td>\n";
675 print "<td width='25%'><input type='text' name='TELEPHONE' value='$pppsettings{'TELEPHONE'}'></td><tr>\n";
676 if ($pppsettings{'TYPE'} eq 'modem' ) {
677 print "<tr><td colspan='3' width='75%'>$Lang::tr{'modem speaker on'}</td>\n";
678 print "<td width='25%'><input type='checkbox' name='SPEAKER' $checked{'SPEAKER'}{'on'} /></td></tr>\n";
682 if ($pppsettings{'TYPE'} eq 'modem') {
685 <td colspan='3' width='75%'>$Lang::tr{'dialing mode'}</td>
686 <td width='25%'><select name='DIALMODE' style="width: 165px">
687 <option value='T' $selected{'DIALMODE'}{'T'}>$Lang::tr{'tone'}</option>
688 <option value='P' $selected{'DIALMODE'}{'P'}>$Lang::tr{'pulse'}</option>
692 <td colspan='3' width='75%'>$Lang::tr{'optional at cmd'} 1</td>
693 <td width='25%'><input type='text' name='ADD_AT1' value='$pppsettings{'ADD_AT1'}'></td>
696 <td colspan='3' width='75%'>$Lang::tr{'optional at cmd'} 2</td>
697 <td width='25%'><input type='text' name='ADD_AT2' value='$pppsettings{'ADD_AT2'}'></td>
700 <td colspan='3' width='75%'>$Lang::tr{'optional at cmd'} 3</td>
701 <td width='25%'><input type='text' name='ADD_AT3' value='$pppsettings{'ADD_AT3'}'></td>
704 <td colspan='3' width='75%'>$Lang::tr{'send cr'}</td>
705 <td width='50%'><input type='checkbox' name='SENDCR' $checked{'SENDCR'}{'on'} /></td>
713 <td colspan='3' width='75%'>$Lang::tr{'idle timeout'} <img src='/blob.gif' alt='*' /></td>
714 <td width='25%'><input type='text' name='TIMEOUT' value='$pppsettings{'TIMEOUT'}' /></td>
717 <td colspan='3' width='75%'>$Lang::tr{'connection debugging'}:</td>
718 <td width='25%'><input type='checkbox' name='DEBUG' $checked{'DEBUG'}{'on'} /></td>
721 <td colspan='4' width='100%'><br></br></td></tr>
723 <td colspan='4' width='100%' bgcolor='$color{'color20'}'><b>$Lang::tr{'reconnection'}:</b></td>
726 <td colspan='4' width='100%'><input type='radio' name='RECONNECTION' value='dialondemand' $checked{'RECONNECTION'}{'dialondemand'}>$Lang::tr{'dod'}</td>
730 if ($pppsettings{'TYPE'} ne 'isdn') {
733 <td colspan='4' width='100%'><input type='radio' name='RECONNECTION' value='persistent' $checked{'RECONNECTION'}{'persistent'}>$Lang::tr{'persistent'}</td>
736 <td colspan='3' width='75%'>$Lang::tr{'backupprofile'}:</td>
737 <td width='25%'><select name='BACKUPPROFILE' style="width: 165px">
740 for ($c = 1; $c <= $maxprofiles; $c++) {
741 print "\t<option value='$c' $selected{'BACKUPPROFILE'}{$c}>$c. $profilenames[$c]</option>\n";
751 <td colspan='3' width='75%'>$Lang::tr{'dod for dns'}</td>
752 <td width='25%'><input type='checkbox' name='DIALONDEMANDDNS' $checked{'DIALONDEMANDDNS'}{'on'} /></td>
755 <td colspan='3' width='75%'>$Lang::tr{'holdoff'}: <img src='/blob.gif' alt='*' /></td>
756 <td width='25%'><input type='text' name='HOLDOFF' value='$pppsettings{'HOLDOFF'}' /></td>
759 <td colspan='3' width='75%'>$Lang::tr{'maximum retries'} <img src='/blob.gif' alt='*' /></td>
760 <td width='25%'><input type='text' name='MAXRETRIES' value='$pppsettings{'MAXRETRIES'}' /></td>
765 if ($pppsettings{'TYPE'} eq 'pptp')
769 <tr><td colspan='4' width='100%'><br></br></td></tr>
771 <td colspan='4' width='100%' bgcolor='$color{'color20'}'><b>$Lang::tr{'pptp settings'}</b></td>
774 <td width='25%'>$Lang::tr{'pptp peer'}: <img src='/blob.gif' alt='*' /></td>
775 <td colspan='3'><input size=50 type='text' name='PPTP_PEER' value='$pppsettings{'PPTP_PEER'}' /></td>
778 <td width='25%'>$Lang::tr{'pptp netconfig'}: <img src='/blob.gif' alt='*' /></td>
779 <td colspan='3'><input size=50 type='text' name='PPTP_NICCFG' value='$pppsettings{'PPTP_NICCFG'}' /></td>
782 <td width='25%'>$Lang::tr{'pptp route'}:</td>
783 <td colspan='3'><input size=50 type='text' name='PPTP_ROUTE' value='$pppsettings{'PPTP_ROUTE'}' /></td>
790 if ($pppsettings{'TYPE'} =~ /^(pppoeatm|pptpatm)$/)
795 <td colspan='4' width='100%' bgcolor='$color{'color20'}'><b>$Lang::tr{'atm settings'}:</b></td>
797 <td nowrap='nowrap'>$Lang::tr{'atm device'}</td>
798 <td><input type='text' size='5' name='ATM_DEV' value='$pppsettings{'ATM_DEV'}' /></td>
799 <td> $Lang::tr{'encapsulation'}:</td>
801 <select name='ENCAP'>
802 <option value='0' $selected{'ENCAP'}{'0'}>LLC</option>
803 <option value='1' $selected{'ENCAP'}{'1'}>VCmux</option>
808 <td nowrap='nowrap'>$Lang::tr{'vpi number'}</td>
809 <td><input type='text' size='5' name='VPI' value='$pppsettings{'VPI'}' /></td>
810 <td> $Lang::tr{'vci number'}</td>
811 <td><input type='text' size='5' name='VCI' value='$pppsettings{'VCI'}' /></td>
817 if ($pppsettings{'TYPE'} =~ /^(pppoe|vdsl|pppoeatm)$/) {
820 <td colspan='4' width='100%' bgcolor='$color{'color20'}'><b>IPTV/VLAN:</b></td>
824 if ( -e
'/opt/pakfire/db/installed/meta-igmpproxy'){
827 <td colspan='3' width='100%'><input type='radio' name='IPTV' value='enable' $checked{'IPTV'}{'enable'}>$Lang::tr{'on'}</td>
828 <td colspan='1' rowspan='2' width='100%'><textarea name='IPTVSERVERS' cols='16' wrap='off'>
831 print $pppsettings{'IPTVSERVERS'};
836 <td colspan='3' width='100%'><input type='radio' name='IPTV' value='disable' $checked{'IPTV'}{'disable'}>$Lang::tr{'off'}</td>
840 <td><input size=5 type='number' name='INET_VLAN' value='$pppsettings{'INET_VLAN'}' /></td>
842 <td><input size=5 type='number' name='IPTV_VLAN' value='$pppsettings{'IPTV_VLAN'}' /></td>
849 print "<tr><td colspan='4' width='100%'>No IPTV possible install addon igmpproxy</td></tr>";
850 if ($pppsettings{'TYPE'} eq 'vdsl') {
854 <td><input size=5 type='number' name='INET_VLAN' value='$pppsettings{'INET_VLAN'}' /></td>
862 if ($pppsettings{'TYPE'} eq 'pppoe' || $pppsettings{'TYPE'} eq 'pppoeatm' || $pppsettings{'TYPE'} eq 'vdsl')
865 <tr><td colspan='4' width='100%'><br></br></td></tr>
867 <td colspan='4' width='100%' bgcolor='$color{'color20'}'><b>$Lang::tr{'pppoe settings'}</b></td>
870 <td width='25%'>$Lang::tr{'service name'}</td>
871 <td colspan='2' width='50%'></td>
872 <td width='25%'><input type='text' name='SERVICENAME' value='$pppsettings{'SERVICENAME'}' /></td>
875 <td width='25%'>$Lang::tr{'concentrator name'}</td>
876 <td colspan='2' width='50%'></td>
877 <td width='25%'><input type='text' name='CONCENTRATORNAME' value='$pppsettings{'CONCENTRATORNAME'}' /></td>
884 <tr><td colspan='4' width='100%'><br></br></td></tr>
886 <td bgcolor='$color{'color20'}' colspan='4' width='100%'><b>MTU/MRU</b></td>
890 <td width='25%'>MTU:</td>
891 <td width='25%'><input type='text' name='MTU' value='$pppsettings{'MTU'}' /></td>
894 <td width='25%'>MRU:</td>
895 <td width='25%'><input type='text' name='MRU' value='$pppsettings{'MRU'}' /></td>
901 <tr><td colspan='4' width='100%'><br></br></td></tr>
903 <td bgcolor='$color{'color20'}' colspan='4' width='100%'><b>$Lang::tr{'authentication'}</b></td>
906 <td width='25%'>$Lang::tr{'username'} <img src='/blob.gif' alt='*' /></td>
907 <td width='25%'><input type='text' name='USERNAME' value='$pppsettings{'USERNAME'}' /></td>
908 <td width='25%'>$Lang::tr{'password'} </td>
909 <td width='25%'><input type='password' name='PASSWORD' value='$pppsettings{'PASSWORD'}' /></td>
912 <td width='25%'>$Lang::tr{'method'}</td>
913 <td width='25%'><select name='AUTH' style="width: 165px">
914 <option value='pap-or-chap' $selected{'AUTH'}{'pap-or-chap'}>$Lang::tr{'pap or chap'}</option>
915 <option value='pap' $selected{'AUTH'}{'pap'}>PAP</option>
916 <option value='chap' $selected{'AUTH'}{'chap'}>CHAP</option>
919 if ($pppsettings{'TYPE'} eq 'modem') {
921 <option value='standard-login-script' $selected{'AUTH'}{'standard-login-script'}>$Lang::tr{'standard login script'}</option>
922 <option value='demon-login-script' $selected{'AUTH'}{'demon-login-script'}>$Lang::tr{'demon login script'}</option>
923 <option value='other-login-script' $selected{'AUTH'}{'other-login-script'}>$Lang::tr{'other login script'}</option>
929 <td width='25%'>$Lang::tr{'script name'}</td>
930 <td width='25%'><input type='text' name='LOGINSCRIPT' value='$pppsettings{'LOGINSCRIPT'}' /></td>
932 <tr><td colspan='4' width='100%'><br></br><hr></hr><br></br></td></tr>
934 <td width='25%'>$Lang::tr{'profile name'} <img src='/blob.gif' alt='*' /></td>
935 <td width='25%'><input type='text' name='PROFILENAME' value='$pppsettings{'PROFILENAME'}'>
936 <td colspan='2' width='50%'></td>
939 <td align='center' colspan='4' width='100%'><input type='submit' name='ACTION' value='$Lang::tr{'save'}'></td>
942 <td colspan='2' width='50%'>$Lang::tr{'legend'}:</td>
943 <td colspan='2' width='50%'><img src='/blob.gif' alt='*' /> $Lang::tr{'required field'}</td>
955 &Header
::closebigbox
();
957 &Header
::closepage
();
961 # make a link from the selected profile to the "default" one.
962 unlink("${General::swroot}/ppp/settings");
963 link("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}",
964 "${General::swroot}/ppp/settings");
965 system ("/usr/bin/touch", "${General::swroot}/ppp/updatesettings");
970 # write secrets file.
971 open(FILE
, ">/${General::swroot}/ppp/secrets") or die "Unable to write secrets file.";
973 my $username = $pppsettings{'USERNAME'};
974 my $password = $pppsettings{'PASSWORD'};
975 print FILE
"'$username' * '$password'\n";
976 chmod 0600, "${General::swroot}/ppp/secrets";
982 $pppsettings{'PROFILENAME'} = $Lang::tr
{'unnamed'};
983 $pppsettings{'COMPORT'} = 'ttyS0';
984 $pppsettings{'MONPORT'} = '';
985 $pppsettings{'DTERATE'} = 115200;
986 $pppsettings{'SPEAKER'} = 'off';
987 $pppsettings{'RECONNECTION'} = 'persistent';
988 $pppsettings{'DIALONDEMANDDNS'} = 'off';
989 $pppsettings{'AUTOCONNECT'} = 'on';
990 $pppsettings{'SENDCR'} = 'off';
991 $pppsettings{'USEIBOD'} = 'off';
992 $pppsettings{'USEDOV'} = 'off';
993 $pppsettings{'MODEM'} = 'PCIST';
994 $pppsettings{'LINE'} = 'WO';
995 $pppsettings{'ENCAP'} = '0';
996 $pppsettings{'VPI'} = '1';
997 $pppsettings{'VCI'} = '32';
998 $pppsettings{'ATM_DEV'} = '0';
999 $pppsettings{'PPTP_PEER'} = '10.0.0.138';
1000 $pppsettings{'PPTP_NICCFG'} = '10.0.0.140/24 broadcast 10.0.0.255';
1001 $pppsettings{'PPTP_ROUTE'} = '';
1002 $pppsettings{'PROTOCOL'} = 'RFC2364';
1003 $pppsettings{'MTU'} = '';
1004 $pppsettings{'MRU'} = '';
1005 $pppsettings{'DIALMODE'} = 'T';
1006 $pppsettings{'MAXRETRIES'} = 5;
1007 $pppsettings{'HOLDOFF'} = 30;
1008 $pppsettings{'TIMEOUT'} = 15;
1009 $pppsettings{'MODULATION'} = 'AUTO';
1010 $pppsettings{'AUTH'} = 'pap-or-chap';
1011 $pppsettings{'DEBUG'} = 'off';
1012 $pppsettings{'BACKUPPROFILE'} = $pppsettings{'PROFILE'};
1013 $pppsettings{'IPTVSERVERS'} = '192.168.2.51/32';
1014 $pppsettings{'IPTV'} = 'disable';
1015 $pppsettings{'INET_VLAN'} = '7';
1016 $pppsettings{'IPTV_VLAN'} = '8';
1018 if ( -e
'/usr/local/bin/igmpproxy'){
1019 $pppsettings{'IPTV'} = 'enable';
1022 # Get PPPoE settings so we can see if PPPoE is enabled or not.
1023 &General
::readhash
("${General::swroot}/ethernet/settings", \
%netsettings);
1025 # empty profile partial pre-initialization
1026 if ($netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/) {
1027 $pppsettings{'TYPE'}=lc($netsettings{'RED_TYPE'});
1029 $pppsettings{'TYPE'}='modem';