mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
red + pppsetup.cgi von Arne.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@940 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
51
config/rootfiles/common/linux-atm
Normal file
51
config/rootfiles/common/linux-atm
Normal file
@@ -0,0 +1,51 @@
|
||||
#etc/atmsigd.conf
|
||||
#etc/hosts.atm
|
||||
#usr/bin/aread
|
||||
#usr/bin/atmdiag
|
||||
#usr/bin/atmdump
|
||||
#usr/bin/awrite
|
||||
#usr/bin/saaldump
|
||||
#usr/bin/sonetdiag
|
||||
#usr/bin/ttcp_atm
|
||||
#usr/include/atm.h
|
||||
#usr/include/atmarp.h
|
||||
#usr/include/atmarpd.h
|
||||
#usr/include/atmd.h
|
||||
#usr/include/atmsap.h
|
||||
#usr/lib/libatm.a
|
||||
#usr/lib/libatm.la
|
||||
usr/lib/libatm.so
|
||||
usr/lib/libatm.so.1
|
||||
usr/lib/libatm.so.1.0.0
|
||||
#usr/man/man4/atmsigd.conf.4
|
||||
#usr/man/man7/qos.7
|
||||
#usr/man/man7/sap.7
|
||||
#usr/man/man8/atmaddr.8
|
||||
#usr/man/man8/atmarp.8
|
||||
#usr/man/man8/atmarpd.8
|
||||
#usr/man/man8/atmdiag.8
|
||||
#usr/man/man8/atmdump.8
|
||||
#usr/man/man8/atmloop.8
|
||||
#usr/man/man8/atmsigd.8
|
||||
#usr/man/man8/atmtcp.8
|
||||
#usr/man/man8/bus.8
|
||||
#usr/man/man8/esi.8
|
||||
#usr/man/man8/lecs.8
|
||||
#usr/man/man8/les.8
|
||||
#usr/man/man8/mpcd.8
|
||||
#usr/man/man8/zeppelin.8
|
||||
#usr/sbin/atmaddr
|
||||
#usr/sbin/atmarp
|
||||
#usr/sbin/atmarpd
|
||||
#usr/sbin/atmloop
|
||||
#usr/sbin/atmsigd
|
||||
#usr/sbin/atmtcp
|
||||
#usr/sbin/bus
|
||||
#usr/sbin/enitune
|
||||
#usr/sbin/esi
|
||||
#usr/sbin/ilmid
|
||||
#usr/sbin/lecs
|
||||
#usr/sbin/les
|
||||
#usr/sbin/mpcd
|
||||
#usr/sbin/zeppelin
|
||||
#usr/sbin/zntune
|
||||
@@ -13,7 +13,6 @@ WARNING: translation string unused: add new ovpn
|
||||
WARNING: translation string unused: add-route
|
||||
WARNING: translation string unused: admin user password has been changed
|
||||
WARNING: translation string unused: administrator user password
|
||||
WARNING: translation string unused: adsl settings
|
||||
WARNING: translation string unused: advproxy LDAP auth
|
||||
WARNING: translation string unused: advproxy NTLM auth
|
||||
WARNING: translation string unused: advproxy advanced proxy
|
||||
@@ -117,7 +116,6 @@ WARNING: translation string unused: email server can not be empty
|
||||
WARNING: translation string unused: enable javascript
|
||||
WARNING: translation string unused: enabled on
|
||||
WARNING: translation string unused: enabledtitle
|
||||
WARNING: translation string unused: encapsulation
|
||||
WARNING: translation string unused: encrypted
|
||||
WARNING: translation string unused: err bk 1
|
||||
WARNING: translation string unused: err bk 10 password
|
||||
@@ -175,7 +173,6 @@ WARNING: translation string unused: invalid port list
|
||||
WARNING: translation string unused: invalid time entered
|
||||
WARNING: translation string unused: invalid uplink speed
|
||||
WARNING: translation string unused: invalid upstream proxy username or password setting
|
||||
WARNING: translation string unused: invalid vpi vpci
|
||||
WARNING: translation string unused: ip address in use
|
||||
WARNING: translation string unused: ip alias added
|
||||
WARNING: translation string unused: ip alias changed
|
||||
@@ -381,9 +378,7 @@ WARNING: translation string unused: urlfilter update results
|
||||
WARNING: translation string unused: use
|
||||
WARNING: translation string unused: use dov
|
||||
WARNING: translation string unused: use ibod
|
||||
WARNING: translation string unused: vci number
|
||||
WARNING: translation string unused: view log
|
||||
WARNING: translation string unused: vpi number
|
||||
WARNING: translation string unused: vpn on blue
|
||||
WARNING: translation string unused: vpn on green
|
||||
WARNING: translation string unused: vpn on orange
|
||||
|
||||
@@ -13,7 +13,6 @@ WARNING: translation string unused: add new ovpn
|
||||
WARNING: translation string unused: add-route
|
||||
WARNING: translation string unused: admin user password has been changed
|
||||
WARNING: translation string unused: administrator user password
|
||||
WARNING: translation string unused: adsl settings
|
||||
WARNING: translation string unused: advproxy LDAP auth
|
||||
WARNING: translation string unused: advproxy NTLM auth
|
||||
WARNING: translation string unused: advproxy advanced proxy
|
||||
@@ -141,7 +140,6 @@ WARNING: translation string unused: email server can not be empty
|
||||
WARNING: translation string unused: enable javascript
|
||||
WARNING: translation string unused: enabled on
|
||||
WARNING: translation string unused: enabledtitle
|
||||
WARNING: translation string unused: encapsulation
|
||||
WARNING: translation string unused: encrypted
|
||||
WARNING: translation string unused: err bk 1
|
||||
WARNING: translation string unused: err bk 10 password
|
||||
@@ -202,7 +200,6 @@ WARNING: translation string unused: invalid port list
|
||||
WARNING: translation string unused: invalid time entered
|
||||
WARNING: translation string unused: invalid uplink speed
|
||||
WARNING: translation string unused: invalid upstream proxy username or password setting
|
||||
WARNING: translation string unused: invalid vpi vpci
|
||||
WARNING: translation string unused: ip address in use
|
||||
WARNING: translation string unused: ip alias added
|
||||
WARNING: translation string unused: ip alias changed
|
||||
@@ -415,9 +412,7 @@ WARNING: translation string unused: use
|
||||
WARNING: translation string unused: use dov
|
||||
WARNING: translation string unused: use ibod
|
||||
WARNING: translation string unused: user cpu
|
||||
WARNING: translation string unused: vci number
|
||||
WARNING: translation string unused: view log
|
||||
WARNING: translation string unused: vpi number
|
||||
WARNING: translation string unused: vpn on blue
|
||||
WARNING: translation string unused: vpn on green
|
||||
WARNING: translation string unused: vpn on orange
|
||||
|
||||
@@ -147,6 +147,7 @@
|
||||
* libxml2-2.6.26
|
||||
* libxslt-1.1.17
|
||||
* linux-2.6.16.53
|
||||
* linux-atm-2.4.1
|
||||
* linux-libc-headers-2.6.12.0
|
||||
* linuxigd-0.95
|
||||
* logrotate-3.7.1
|
||||
|
||||
@@ -479,14 +479,6 @@ print <<END
|
||||
</table>
|
||||
<br />
|
||||
<hr />
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td align='right'>
|
||||
<b><small><a href="http://www.ban-solms.de/t/IPCop.html" target="_blank">Connection Scheduler $CONNSCHED::version</a></small></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
END
|
||||
;
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ if ($pppsettings{'ACTION'} ne '' &&
|
||||
}
|
||||
elsif ($pppsettings{'ACTION'} eq $Lang::tr{'refresh'})
|
||||
{
|
||||
unless ($pppsettings{'TYPE'} =~ /^(modem|serial|isdn|pppoe|pptp)$/) {
|
||||
unless ($pppsettings{'TYPE'} =~ /^(modem|serial|isdn|pppoe|pptp|pppoeatm)$/) {
|
||||
$errormessage = $Lang::tr{'invalid input'};
|
||||
goto ERROR; }
|
||||
my $type = $pppsettings{'TYPE'};
|
||||
@@ -75,7 +75,7 @@ elsif ($pppsettings{'ACTION'} eq $Lang::tr{'save'})
|
||||
if ($pppsettings{'TYPE'} =~ /^(modem|serial|isdn)$/ && $pppsettings{'COMPORT'} !~ /^(ttyS0|ttyS1|ttyS2|ttyS3|ttyS4|ttyACM0|ttyACM1|ttyACM2|ttyACM3|isdn1|isdn2)$/) {
|
||||
$errormessage = $Lang::tr{'invalid input'};
|
||||
goto ERROR; }
|
||||
if ($pppsettings{'TYPE'} =~ /^(modem|serial)$/ && $pppsettings{'DTERATE'} !~ /^(9600|19200|38400|57600|115200|230400|460800)$/) {
|
||||
if ($pppsettings{'TYPE'} =~ /^(modem|serial)$/ && $pppsettings{'DTERATE'} !~ /^(9600|19200|38400|57600|115200|230400|460800|921600)$/) {
|
||||
$errormessage = $Lang::tr{'invalid input'};
|
||||
goto ERROR; }
|
||||
if ($pppsettings{'TYPE'} eq 'modem' && $pppsettings{'DIALMODE'} !~ /^(T|P)$/) {
|
||||
@@ -155,7 +155,21 @@ elsif ($pppsettings{'ACTION'} eq $Lang::tr{'save'})
|
||||
}
|
||||
if ($errormessage ne '') {goto ERROR; }
|
||||
}
|
||||
|
||||
if ($pppsettings{'TYPE'} =~ /^(pppoeatm)$/) {
|
||||
if ( ($pppsettings{'VPI'} eq '') || ($pppsettings{'VCI'} eq '') ) {
|
||||
$errormessage = $Lang::tr{'invalid vpi vpci'};
|
||||
goto ERROR; }
|
||||
if ( (!($pppsettings{'VPI'} =~ /^\d+$/)) || (!($pppsettings{'VCI'} =~ /^\d+$/)) ) {
|
||||
$errormessage = $Lang::tr{'invalid vpi vpci'};
|
||||
goto ERROR; }
|
||||
if (($pppsettings{'VPI'} eq '0') && ($pppsettings{'VCI'} eq '0')) {
|
||||
$errormessage = $Lang::tr{'invalid vpi vpci'};
|
||||
goto ERROR; }
|
||||
if ( $pppsettings{'PROTOCOL'} eq '' ) {
|
||||
$errormessage = $Lang::tr{'invalid input'};
|
||||
goto ERROR; }
|
||||
}
|
||||
|
||||
if ( ($pppsettings{'PROTOCOL'} eq 'RFC1483') && ($pppsettings{'METHOD'} eq '') && \
|
||||
($pppsettings{'TYPE'} !~ /^(alcatelusb|fritzdsl)$/)) {
|
||||
$errormessage = $Lang::tr{'invalid input'};
|
||||
@@ -194,10 +208,10 @@ elsif ($pppsettings{'ACTION'} eq $Lang::tr{'save'})
|
||||
$errormessage = $Lang::tr{'dod not compatible with ddns'};
|
||||
goto ERROR; }
|
||||
|
||||
if( $pppsettings{'PROTOCOL'} eq 'RFC1483') {
|
||||
$pppsettings{'ENCAP'} = $pppsettings{'ENCAP_RFC1483'}; }
|
||||
if( $pppsettings{'PROTOCOL'} eq 'RFC2364') {
|
||||
$pppsettings{'ENCAP'} = $pppsettings{'ENCAP_RFC2364'}; }
|
||||
# if( $pppsettings{'PROTOCOL'} eq 'RFC1483') {
|
||||
# $pppsettings{'ENCAP'} = $pppsettings{'ENCAP_RFC1483'}; }
|
||||
# if( $pppsettings{'PROTOCOL'} eq 'RFC2364') {
|
||||
# $pppsettings{'ENCAP'} = $pppsettings{'ENCAP_RFC2364'}; }
|
||||
delete $pppsettings{'ENCAP_RFC1483'};
|
||||
delete $pppsettings{'ENCAP_RFC2364'};
|
||||
|
||||
@@ -322,6 +336,7 @@ $selected{'DTERATE'}{'57600'} = '';
|
||||
$selected{'DTERATE'}{'115200'} = '';
|
||||
$selected{'DTERATE'}{'230400'} = '';
|
||||
$selected{'DTERATE'}{'460800'} = '';
|
||||
$selected{'DTERATE'}{'921600'} = '';
|
||||
$selected{'DTERATE'}{$pppsettings{'DTERATE'}} = "selected='selected'";
|
||||
|
||||
$checked{'SPEAKER'}{'off'} = '';
|
||||
@@ -377,10 +392,11 @@ $checked{'PROTOCOL'}{$pppsettings{'PROTOCOL'}} = "checked='checked'";
|
||||
|
||||
$selected{'ENCAP'}{'0'} = '';
|
||||
$selected{'ENCAP'}{'1'} = '';
|
||||
$selected{'ENCAP'}{'2'} = '';
|
||||
$selected{'ENCAP'}{'3'} = '';
|
||||
$selected{'ENCAP'}{'4'} = '';
|
||||
#$selected{'ENCAP'}{'2'} = '';
|
||||
#$selected{'ENCAP'}{'3'} = '';
|
||||
#$selected{'ENCAP'}{'4'} = '';
|
||||
$selected{'ENCAP'}{$pppsettings{'ENCAP'}} = "selected='selected'";
|
||||
|
||||
$checked{'METHOD'}{'STATIC'} = '';
|
||||
$checked{'METHOD'}{'PPPOE'} = '';
|
||||
$checked{'METHOD'}{'PPPOE_PLUGIN'} = '';
|
||||
@@ -418,7 +434,7 @@ print "<form method='post' action='$ENV{'SCRIPT_NAME'}'>\n";
|
||||
print <<END
|
||||
<table width='95%' cellspacing='0'>
|
||||
<tr>
|
||||
<td align='left'>$Lang::tr{'profile'}</td>
|
||||
<td align='left'>$Lang::tr{'profile'}</td>
|
||||
<td align='left'>
|
||||
<select name='PROFILE' style="width: 165px">
|
||||
END
|
||||
@@ -458,41 +474,59 @@ if ($netsettings{'RED_TYPE'} eq 'PPPOE') {
|
||||
if ($netsettings{'RED_TYPE'} eq 'PPTP') {
|
||||
print "\t<option value='pptp' $selected{'TYPE'}{'pptp'}>PPTP</option>\n";
|
||||
}
|
||||
if (-f "/proc/bus/usb/devices") {
|
||||
my $atmdev=`cat /proc/net/atm/devices | grep 0`;
|
||||
chomp ($atmdev);
|
||||
if ($atmdev ne '') {
|
||||
print <<END
|
||||
<option value='eciadsl' $selected{'TYPE'}{'eciadsl'}>ECI USB ADSL</option>
|
||||
<option value='eagleusbadsl' $selected{'TYPE'}{'eagleusbadsl'}>Eagle USB ADSL (Acer Allied-Telesyn Comtrend D-Link Sagem USR)</option>
|
||||
<option value='conexantusbadsl' $selected{'TYPE'}{'conexantusbadsl'}>Conexant USB(Aetra Amigo Draytek Etec Mac Olitec Vitelcom Zoom)</option>
|
||||
<option value='amedynusbadsl' $selected{'TYPE'}{'amedynusbadsl'}>Zyxel 630-11 / Asus AAM6000UG USB ADSL</option>
|
||||
<option value='3cp4218usbadsl' $selected{'TYPE'}{'3cp4218usbadsl'}>3Com USB AccessRunner</option>
|
||||
<option value='alcatelusb' $selected{'TYPE'}{'alcatelusb'}>Speedtouch USB ADSL user mode driver</option>
|
||||
<option value='alcatelusbk' $selected{'TYPE'}{'alcatelusbk'}>Speedtouch USB ADSL kernel mode driver</option>
|
||||
<option value='pppoeatm' $selected{'TYPE'}{'pppoeatm'}>PPPoE over ATM-BRIDGE</option>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
#if (0) {
|
||||
# print <<END
|
||||
# <option value='eciadsl' $selected{'TYPE'}{'eciadsl'}>ECI USB ADSL</option>
|
||||
# <option value='eagleusbadsl' $selected{'TYPE'}{'eagleusbadsl'}>Eagle USB ADSL (Acer Allied-Telesyn Comtrend D-Link Sagem USR)</option>
|
||||
# <option value='conexantusbadsl' $selected{'TYPE'}{'conexantusbadsl'}>Conexant USB(Aetra Amigo Draytek Etec Mac Olitec Vitelcom Zoom)</option>
|
||||
# <option value='amedynusbadsl' $selected{'TYPE'}{'amedynusbadsl'}>Zyxel 630-11 / Asus AAM6000UG USB ADSL</option>
|
||||
# <option value='3cp4218usbadsl' $selected{'TYPE'}{'3cp4218usbadsl'}>3Com USB AccessRunner</option>
|
||||
# <option value='alcatelusb' $selected{'TYPE'}{'alcatelusb'}>Speedtouch USB ADSL user mode driver</option>
|
||||
# <option value='alcatelusbk' $selected{'TYPE'}{'alcatelusbk'}>Speedtouch USB ADSL kernel mode driver</option>
|
||||
#END
|
||||
#;
|
||||
#}
|
||||
# print "<option value='fritzdsl' $selected{'TYPE'}{'fritzdsl'}>Fritz!DSL</option>";
|
||||
|
||||
print <<END
|
||||
</select></td>
|
||||
<td colspan='2' width='50%'><input type='submit' name='ACTION' value='$Lang::tr{'refresh'}'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' width='50%'>USB:</td>
|
||||
</select></td>
|
||||
<td colspan='1' width='25%'><input type='submit' name='ACTION' value='$Lang::tr{'refresh'}'></td>
|
||||
END
|
||||
;
|
||||
if ($pppsettings{'TYPE'} =~ /^(modem)$/) {
|
||||
print <<END
|
||||
<td colspan='1' width='25%'><A HREF=modem.cgi>$Lang::tr{'modem configuration'}</A></td>
|
||||
END
|
||||
;
|
||||
if (-f "/proc/bus/usb/devices") {
|
||||
my $usb=`lsmod | cut -d ' ' -f1 | grep -E "hci"`;
|
||||
if ($usb eq '') {
|
||||
print "\t<td colspan='2' width='50%'>$Lang::tr{'not running'}</td></tr>\n";
|
||||
} else {
|
||||
print "\t<td colspan='2' width='50%'>$usb</td></tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
|
||||
#if (-f "/proc/bus/usb/devices") {
|
||||
# <td colspan='2' width='50%'>USB:</td>
|
||||
# my $usb=`lsmod | cut -d ' ' -f1 | grep -E "hci"`;
|
||||
# if ($usb eq '') {
|
||||
# print "\t<td colspan='2' width='50%'>$Lang::tr{'not running'}</td></tr>\n";
|
||||
# } else {
|
||||
# print "\t<td colspan='2' width='50%'>$usb</td></tr>\n";
|
||||
# }
|
||||
#}
|
||||
|
||||
if ($pppsettings{'TYPE'}) {
|
||||
print "<tr><td colspan='4' width='100%'><br></br></td></tr>";
|
||||
|
||||
if ($pppsettings{'TYPE'} =~ /^(modem|serial)$/) {
|
||||
print <<END
|
||||
|
||||
<tr>
|
||||
<td colspan='3' width='75%'>$Lang::tr{'interface'}:</td>
|
||||
<td width='25%'><select name='COMPORT' style="width: 165px">
|
||||
@@ -509,7 +543,7 @@ END
|
||||
<option value='ttyACM1' $selected{'COMPORT'}{'ttyACM1'}>$Lang::tr{'usb modem on acm1'}</option>
|
||||
<option value='ttyACM2' $selected{'COMPORT'}{'ttyACM2'}>$Lang::tr{'usb modem on acm2'}</option>
|
||||
<option value='ttyACM3' $selected{'COMPORT'}{'ttyACM3'}>$Lang::tr{'usb modem on acm3'}</option>
|
||||
</select></td>
|
||||
</select></td>
|
||||
END
|
||||
;
|
||||
}
|
||||
@@ -525,6 +559,7 @@ END
|
||||
<option value='115200' $selected{'DTERATE'}{'115200'}>115200</option>
|
||||
<option value='230400' $selected{'DTERATE'}{'230400'}>230400</option>
|
||||
<option value='460800' $selected{'DTERATE'}{'460800'}>460800</option>
|
||||
<option value='921600' $selected{'DTERATE'}{'921600'}>921600</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
END
|
||||
@@ -650,7 +685,38 @@ print <<END
|
||||
END
|
||||
;
|
||||
}
|
||||
if ($pppsettings{'TYPE'} eq 'pppoe')
|
||||
if ($pppsettings{'TYPE'} =~ /^(pppoeatm)$/)
|
||||
{
|
||||
|
||||
print <<END
|
||||
</table>
|
||||
<table width='100%'>
|
||||
<tr>
|
||||
<td colspan='4' width='100%' bgcolor='$color{'color20'}'><b>$Lang::tr{'adsl settings'}:</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td> $Lang::tr{'encapsulation'}:</td>
|
||||
<td colspan='2' width='30%'>
|
||||
<select name='ENCAP'>
|
||||
<option value='0' $selected{'ENCAP'}{'0'}>LLC</option>
|
||||
<option value='1' $selected{'ENCAP'}{'1'}>VCmux</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td nowrap='nowrap'>$Lang::tr{'vpi number'}</td>
|
||||
<td><input type='text' size='5' name='VPI' value='$pppsettings{'VPI'}' /></td>
|
||||
<td align='right'>$Lang::tr{'vci number'}</td>
|
||||
<td colspan='2'><input type='text' size='5' name='VCI' value='$pppsettings{'VCI'}' /></td>
|
||||
</tr>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
if ($pppsettings{'TYPE'} eq 'pppoe' || $pppsettings{'TYPE'} eq 'pppoeatm')
|
||||
{
|
||||
print <<END
|
||||
<tr><td colspan='4' width='100%'><br></br></td></tr>
|
||||
@@ -785,6 +851,8 @@ sub initprofile
|
||||
$pppsettings{'MODEM'} = 'PCIST';
|
||||
$pppsettings{'LINE'} = 'WO';
|
||||
$pppsettings{'ENCAP'} = '0';
|
||||
$pppsettings{'VPI'} = '1';
|
||||
$pppsettings{'VCI'} = '32';
|
||||
$pppsettings{'PHONEBOOK'} = 'RELAY_PPP1';
|
||||
$pppsettings{'PROTOCOL'} = 'RFC2364';
|
||||
$pppsettings{'METHOD'} = 'PPPOE_PLUGIN';
|
||||
|
||||
78
lfs/linux-atm
Normal file
78
lfs/linux-atm
Normal file
@@ -0,0 +1,78 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
# the Free Software Foundation, either version 3 of the License, or #
|
||||
# (at your option) any later version. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, #
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||
# GNU General Public License for more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Definitions
|
||||
###############################################################################
|
||||
|
||||
include Config
|
||||
|
||||
VER = 2.4.1
|
||||
|
||||
THISAPP = linux-atm-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
DL_FROM = $(URL_IPFIRE)
|
||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
||||
|
||||
###############################################################################
|
||||
# Top-level Rules
|
||||
###############################################################################
|
||||
|
||||
objects = $(DL_FILE)
|
||||
|
||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
|
||||
$(DL_FILE)_MD5 = 84fef49cc39ff2605204246666f65864
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
|
||||
|
||||
download :$(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
md5 : $(subst %,%_MD5,$(objects))
|
||||
|
||||
###############################################################################
|
||||
# Downloading, checking, md5sum
|
||||
###############################################################################
|
||||
|
||||
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
|
||||
@$(CHECK)
|
||||
|
||||
$(patsubst %,$(DIR_DL)/%,$(objects)) :
|
||||
@$(LOAD)
|
||||
|
||||
$(subst %,%_MD5,$(objects)) :
|
||||
@$(MD5)
|
||||
|
||||
###############################################################################
|
||||
# Installation Details
|
||||
###############################################################################
|
||||
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-atm-2.4.1-gcc-4.patch
|
||||
cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc --disable-nls
|
||||
cd $(DIR_APP) && make
|
||||
cd $(DIR_APP) && make install
|
||||
@rm -rf $(DIR_APP)
|
||||
@$(POSTBUILD)
|
||||
1
make.sh
1
make.sh
@@ -334,6 +334,7 @@ buildipfire() {
|
||||
ipfiremake r8169
|
||||
ipfiremake zaptel
|
||||
ipfiremake pkg-config
|
||||
ipfiremake linux-atm
|
||||
ipfiremake cpio
|
||||
ipfiremake klibc
|
||||
ipfiremake mkinitcpio
|
||||
|
||||
@@ -148,18 +148,32 @@ case "${1}" in
|
||||
fi
|
||||
|
||||
elif [ "$TYPE" == "PPPOE" ]; then
|
||||
|
||||
|
||||
if ( ps ax | grep -q [p]ppd ); then
|
||||
echo Error! A pppd is still running. Stop it first.
|
||||
echo
|
||||
exit 1;
|
||||
fi
|
||||
eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings)
|
||||
|
||||
[ -c "/dev/ppp" ] || mknod /dev/ppp c 108 0
|
||||
|
||||
if [ "$TYPE" == "PPPOE" ]; then
|
||||
boot_mesg "Bringing up the PPPoE interface on ${DEVICE}..."
|
||||
ip addr add 1.1.1.1/24 broadcast 1.1.1.255 dev ${DEVICE}
|
||||
PPP_NIC=${DEVICE}
|
||||
|
||||
if [ "$TYPE" == "pppoeatm" ]; then
|
||||
PPP_NIC=nas0
|
||||
boot_mesg "Create ATM-Bridge as $PPP_NIC ..."
|
||||
br2684ctl -c0 -e${ENCAP} -a0.${VPI}.${VCI} >/dev/null 2>&1 &
|
||||
sleep 1
|
||||
ifconfig $PPP_NIC up
|
||||
TYPE="pppoe"
|
||||
fi
|
||||
if [ "$TYPE" == "pppoe" ]; then
|
||||
boot_mesg "Bringing up the PPPoE interface on $PPP_NIC ..."
|
||||
ip addr add 1.1.1.1/24 broadcast 1.1.1.255 dev $PPP_NIC
|
||||
else
|
||||
boot_mesg "Bringing up the PPP via ${TYPE} on ${COMPORT}..."
|
||||
fi
|
||||
|
||||
### ###
|
||||
### Configuring the pppd ###
|
||||
### ###
|
||||
@@ -167,15 +181,17 @@ case "${1}" in
|
||||
### Plugin Options
|
||||
#
|
||||
[ "${METHOD}" == "PPPOE_PLUGIN" ] && \
|
||||
PLUGOPTS="plugin /usr/lib/pppd/2.4.4/rp-pppoe.so nic-${DEVICE}"
|
||||
PLUGOPTS="plugin /usr/lib/pppd/2.4.4/rp-pppoe.so"
|
||||
|
||||
# PLUGOPTS="plugin /usr/lib/pppd/2.4.4/rp-pppoe.so nic-$PPP_NIC"
|
||||
|
||||
### Synchronous Mode
|
||||
#
|
||||
#PPPOE_SYNC=-s
|
||||
#PPPD_SYNC=sync
|
||||
|
||||
### Access Concentrator Name
|
||||
#
|
||||
#PPPD_SYNC=sync
|
||||
|
||||
### Access Concentrator Name
|
||||
#
|
||||
if [ -n "${CONCENTRATORNAME}" ]; then
|
||||
ACNAME="-C ${CONCENTRATORNAME}"
|
||||
fi
|
||||
@@ -189,7 +205,7 @@ case "${1}" in
|
||||
SERVICENAME="-S ${SERVICENAME}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
### Authentication Types
|
||||
#
|
||||
if [ "${AUTH}" == "pap" ]; then
|
||||
@@ -199,7 +215,18 @@ case "${1}" in
|
||||
else
|
||||
AUTH=""
|
||||
fi
|
||||
|
||||
|
||||
### DNS Config
|
||||
#
|
||||
if [ "${DNS}" == "Automatic" ]; then
|
||||
DNS="usepeerdns"
|
||||
else
|
||||
DNS=""
|
||||
echo nameserver=$DNS1 > /etc/ppp/resolv.conf
|
||||
echo nameserver=$DNS2 >> /etc/ppp/resolv.conf
|
||||
|
||||
fi
|
||||
|
||||
### Dial On Demand
|
||||
#
|
||||
if [ "${RECONNECTION}" != "persistent" ]; then
|
||||
@@ -211,29 +238,28 @@ case "${1}" in
|
||||
if [ "${RECONNECTION}" == "dialondemand" ]; then
|
||||
touch /var/ipfire/red/dial-on-demand
|
||||
DEMAND="demand persist idle ${SECONDS} 10.112.112.112:10.112.112.113"
|
||||
DEMAND+=" ipcp-accept-remote ipcp-accept-local connect true noipdefault ktune"
|
||||
DEMAND+=" ipcp-accept-remote ipcp-accept-local noipdefault ktune"
|
||||
fi
|
||||
fi
|
||||
|
||||
### When using pppoe-plugin the device has to be the last option
|
||||
#
|
||||
[ "${METHOD}" == "PPPOE_PLUGIN" ] && PLUGOPTS+=" ${DEVICE}"
|
||||
[ "${METHOD}" == "PPPOE_PLUGIN" ] && PLUGOPTS+=" $PPP_NIC"
|
||||
|
||||
if [ "$TYPE" == "modem" ]; then
|
||||
PLUGOPTS=" /dev/${COMPORT} ${DTERATE} connect /etc/ppp/dialer"
|
||||
PLUGOPTS=" /dev/${COMPORT} ${DTERATE} connect /etc/ppp/dialer lock modem crtscts"
|
||||
elif [ "$TYPE" == "serial" ]; then
|
||||
PLUGOPTS=" /dev/${COMPORT} ${DTERATE} connect /bin/true"
|
||||
PLUGOPTS=" /dev/${COMPORT} ${DTERATE} connect /bin/true lock modem crtscts"
|
||||
fi
|
||||
|
||||
### Standard PPP options we always use
|
||||
#
|
||||
PPP_STD_OPTIONS="$PLUGOPTS usepeerdns defaultroute noipdefault noauth"
|
||||
PPP_STD_OPTIONS="$PLUGOPTS $DNS defaultroute noipdefault noauth"
|
||||
PPP_STD_OPTIONS+=" default-asyncmap hide-password nodetach mtu ${MTU}"
|
||||
PPP_STD_OPTIONS+=" mru ${MTU} noaccomp nodeflate nopcomp novj novjccomp"
|
||||
PPP_STD_OPTIONS+=" nobsdcomp user ${USERNAME} lcp-echo-interval 20"
|
||||
PPP_STD_OPTIONS+=" lcp-echo-failure 3 ${AUTH}"
|
||||
[ "${TYPE}" eq "PPPOE" ] || PPP_STD_OPTIONS+=" lock modem crtscts user ${USERNAME}"
|
||||
|
||||
|
||||
### Debugging
|
||||
#
|
||||
if [ "${DEBUG}" == "on" ]; then
|
||||
@@ -244,8 +270,8 @@ case "${1}" in
|
||||
|
||||
### PPPoE invocation
|
||||
#
|
||||
if [ "${TYPE}" == "PPPOE" ]; then
|
||||
PPPOE_CMD="/usr/sbin/pppoe -p /var/run/ppp-ipfire.pid.pppoe -I ${DEVICE}"
|
||||
if [ "$TYPE" == "pppoe" ]; then
|
||||
PPPOE_CMD="/usr/sbin/pppoe -p /var/run/ppp-ipfire.pid.pppoe -I $PPP_NIC"
|
||||
PPPOE_CMD+=" -T 80 -U $PPPOE_SYNC $ACNAME $SERVICENAMEOPT"
|
||||
fi
|
||||
|
||||
@@ -254,9 +280,11 @@ case "${1}" in
|
||||
if [ "${METHOD}" == "PPPOE_PLUGIN" ]; then
|
||||
/usr/sbin/pppd $PPP_STD_OPTIONS $DEBUG $DEMAND >/dev/null 2>&1 &
|
||||
evaluate_retval
|
||||
# echo PLUGIN: /usr/sbin/pppd $PPP_STD_OPTIONS $DEBUG $DEMAND
|
||||
else
|
||||
/usr/sbin/pppd pty "$PPPOE_CMD" $PPP_STD_OPTIONS $DEBUG $DEMAND $PPPD_SYNC >/dev/null 2>&1 &
|
||||
evaluate_retval
|
||||
# echo PPP: /usr/sbin/pppd pty "$PPPOE_CMD" $PPP_STD_OPTIONS $DEBUG $DEMAND $PPPD_SYNC
|
||||
fi
|
||||
|
||||
/etc/rc.d/init.d/connectd start
|
||||
@@ -307,12 +335,11 @@ case "${1}" in
|
||||
fi
|
||||
|
||||
elif [ "$TYPE" == "PPPOE" ]; then
|
||||
boot_mesg "Bringing down the PPPoE interface on ${DEVICE}..."
|
||||
boot_mesg "Bringing down the PPP interface ..."
|
||||
rm -f /var/ipfire/red/keepconnected
|
||||
kill -TERM /usr/sbin/pppd 2>/dev/null
|
||||
killall -w -s TERM /usr/sbin/pppd 2>/dev/null
|
||||
evaluate_retval
|
||||
sleep 5
|
||||
|
||||
killall -w -s TERM br2684ctl >/dev/null 2>&1
|
||||
ip addr del 1.1.1.1/24 broadcast 1.1.1.255 dev ${DEVICE}
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user