Added VDSL Options to pppsetup.cgi (untested, igmpproxy needs to handle the iptv server adresses)

This commit is contained in:
maniacikarus
2009-03-17 21:49:02 +01:00
parent 0d0a7614a3
commit 67bf4b98c5

View File

@@ -53,17 +53,15 @@ $pppsettings{'ACTION'} = '';
&Header::getcgihash(\%pppsettings);
if ($pppsettings{'ACTION'} ne '' &&
(-e '/var/run/ppp-ipcop.pid' || -e "${General::swroot}/red/active"))
{
( -e "${General::swroot}/red/active")){
$errormessage = $Lang::tr{'unable to alter profiles while red is active'};
# read in the current vars
%pppsettings = ();
$pppsettings{'VALID'} = '';
&General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
}
&General::readhash("${General::swroot}/ppp/settings", \%pppsettings);}
elsif ($pppsettings{'ACTION'} eq $Lang::tr{'refresh'})
{
unless ($pppsettings{'TYPE'} =~ /^(modem|serial|isdn|pppoe|pptp|pppoeatm|pptpatm)$/) {
unless ($pppsettings{'TYPE'} =~ /^(modem|serial|isdn|pppoe|pptp|vdsl|pppoeatm|pptpatm)$/) {
$errormessage = $Lang::tr{'invalid input'};
goto ERROR; }
my $type = $pppsettings{'TYPE'};
@@ -302,6 +300,7 @@ $selected{'TYPE'}{'modem'} = '';
$selected{'TYPE'}{'serial'} = '';
$selected{'TYPE'}{'pppoe'} = '';
$selected{'TYPE'}{'pptp'} = '';
$selected{'TYPE'}{'vdsl'} = '';
$selected{'TYPE'}{'pppoeatm'} = '';
$selected{'TYPE'}{'pptpatm'} = '';
$selected{'TYPE'}{$pppsettings{'TYPE'}} = "selected='selected'";
@@ -411,6 +410,10 @@ $checked{'DNS'}{'Automatic'} = '';
$checked{'DNS'}{'Manual'} = '';
$checked{'DNS'}{$pppsettings{'DNS'}} = "checked='checked'";
$checked{'IPTV'}{'enable'} = '';
$checked{'IPTV'}{'disable'} = '';
$checked{'IPTV'}{$pppsettings{'IPTV'}} = "checked='checked'";
&Header::openpage($Lang::tr{'ppp setup'}, 1, '');
&Header::openbigbox('100%', 'left', '', $errormessage);
@@ -480,6 +483,7 @@ print <<END
<option value='serial' $selected{'TYPE'}{'serial'}>$Lang::tr{'serial'}</option>
<option value='pppoe' $selected{'TYPE'}{'pppoe'}>PPPoE</option>
<option value='pptp' $selected{'TYPE'}{'pptp'}>PPTP</option>
<option value='vdsl' $selected{'TYPE'}{'vdsl'}>VDSL</option>
END
;
@@ -724,8 +728,36 @@ END
;
}
if ($pppsettings{'TYPE'} eq 'vdsl') {
print <<END
<tr>
<td colspan='4' width='100%' bgcolor='$color{'color20'}'><b>IPTV:</b></td>
</tr>
END
;
if ( -e '/usr/local/bin/igmpproxy'){
print <<END
<tr>
<td colspan='3' width='100%'><input type='radio' name='IPTV' value='enable' $checked{'IPTV'}{'enable'}>$Lang::tr{'on'}</td>
<td colspan='1' rowspan='2' width='100%'><textarea name='IPTVSERVERS' cols='16' wrap='off'>
END
;
print $pppsettings{'IPTVSERVERS'};
print <<END
</textarea></td>
</tr>
<tr>
<td colspan='3' width='100%'><input type='radio' name='IPTV' value='disable' $checked{'IPTV'}{'disable'}>$Lang::tr{'off'}</td>
</tr>
END
;
}
else {
print "<tr><td colspan='4' width='100%'>No IPTV possible install addon igmpproxy</td></tr>";
}
}
if ($pppsettings{'TYPE'} eq 'pppoe' || $pppsettings{'TYPE'} eq 'pppoeatm')
if ($pppsettings{'TYPE'} eq 'pppoe' || $pppsettings{'TYPE'} eq 'pppoeatm' || $pppsettings{'TYPE'} eq 'vdsl')
{
print <<END
<tr><td colspan='4' width='100%'><br></br></td></tr>
@@ -882,6 +914,12 @@ sub initprofile
$pppsettings{'DNS'} = 'Automatic';
$pppsettings{'DEBUG'} = 'off';
$pppsettings{'BACKUPPROFILE'} = $pppsettings{'PROFILE'};
$pppsettings{'IPTVSERVERS'} = '192.168.2.51/32';
$pppsettings{'IPTV'} = 'disable';
if ( -e '/usr/local/bin/igmpproxy'){
$pppsettings{'IPTV'} = 'enable';
}
# Get PPPoE settings so we can see if PPPoE is enabled or not.
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);