[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-cvs
Subject: [IPCop-cvs] ipcop/src/rc.d rc.alcatelusb,1.10,1.11 rc.alcatelusbk,1.9,1.10 rc.bewanadsl,1.8,1.9 rc.c
From: Mark Wormgoor <riddles () users ! sourceforge ! net>
Date: 2005-03-29 18:45:38
Message-ID: E1DGLj8-0007Oa-Il () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/ipcop/ipcop/src/rc.d
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25484/src/rc.d
Modified Files:
rc.alcatelusb rc.alcatelusbk rc.bewanadsl rc.conexantpciadsl
rc.eagleusbadsl rc.eciadsl rc.firewall rc.firewall.local
rc.fritzdsl rc.netaddress.up rc.network rc.red rc.sysinit
rc.updatered
Log Message:
Merging all changes from 1.4 back into trunk
Index: rc.alcatelusbk
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.alcatelusbk,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** rc.alcatelusbk 30 Sep 2004 07:49:05 -0000 1.9
--- rc.alcatelusbk 29 Mar 2005 18:45:35 -0000 1.10
***************
*** 26,32 ****
exit 1
;;
! '0.00' | '2.00')
modem='v0123'
! # Speedtouch Rev 0.01 Annex B (ISDN) or 530 aka Rev 3.00 does not work actually
;;
'4.00')
--- 26,32 ----
exit 1
;;
! '0.00' | '0.01' | '2.00')
modem='v0123'
! # Speedtouch 530 aka Rev 3.00 does not work actually
;;
'4.00')
***************
*** 34,38 ****
;;
*)
! msg "Unknow version or unsupported model Rev $speedtouch"
exit 1
;;
--- 34,38 ----
;;
*)
! msg "Unknown version or unsupported model Rev $speedtouch"
exit 1
;;
Index: rc.red
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.red,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** rc.red 30 Sep 2004 07:49:06 -0000 1.32
--- rc.red 29 Mar 2005 18:45:35 -0000 1.33
***************
*** 26,30 ****
$< = $>;
! require 'CONFIG_ROOT/header.pl';
my %pppsettings;
--- 26,31 ----
$< = $>;
! use strict;
! require 'CONFIG_ROOT/general-functions.pl';
my %pppsettings;
***************
*** 35,42 ****
# read vars back from file.
! &readhash("${swroot}/ppp/settings", \%pppsettings);
! &readhash("${swroot}/isdn/settings", \%isdnsettings);
! &readhash("${swroot}/ethernet/settings", \%netsettings);
! &readhash("${swroot}/dhcp/settings", \%dhcpsettings);
sub dodhcpdial($;$) {
--- 36,43 ----
# read vars back from file.
! &General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
! &General::readhash("${General::swroot}/isdn/settings", \%isdnsettings);
! &General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
! &General::readhash("${General::swroot}/dhcp/settings", \%dhcpsettings);
sub dodhcpdial($;$) {
***************
*** 48,54 ****
'--destination-port', '68', '-i', $iface, '-j', 'ACCEPT');
! foreach ("<${swroot}/dhcpc/*.info>") { unlink $1 if ( $_ =~ /^([\/\w.-]+)$/ ); }
my @dhcpcommand = ('/usr/sbin/dhcpcd');
! push(@dhcpcommand, ('-R', "$iface",'-L', "${swroot}/dhcpc"));
#FIXME the only way actually to set debug use is in pppsetup.cgi and 'RED is \
modem/isdn' interface
--- 49,55 ----
'--destination-port', '68', '-i', $iface, '-j', 'ACCEPT');
! foreach ("<${General::swroot}/dhcpc/*.info>") { unlink $1 if ( $_ =~ \
/^([\/\w.-]+)$/ ); } my @dhcpcommand = ('/usr/sbin/dhcpcd');
! push(@dhcpcommand, ('-N', '-R', "$iface",'-L', "${General::swroot}/dhcpc"));
#FIXME the only way actually to set debug use is in pppsetup.cgi and 'RED is \
modem/isdn' interface
***************
*** 61,68 ****
if (system (@dhcpcommand)) {
! &log('dhcpcd fail');
exit 1;
} else {
! &log('dhcpcd success');
}
}
--- 62,69 ----
if (system (@dhcpcommand)) {
! &General::log('dhcpcd fail');
exit 1;
} else {
! &General::log('dhcpcd success');
}
}
***************
*** 74,94 ****
system('/bin/killall /usr/bin/br2684ctl 2>/dev/null');
system('/sbin/modprobe', '-r', 'br2684');
! if ($pppsettings{'$GATEWAY'} ne '') { system('/usr/sbin/atmarp', '-d', \
$pppsettings{'$GATEWAY'},
! '2>/dev/null');}
! system('/bin/killall /usr/sbin/atmarpd 2>/dev/null');
! system('/sbin/ifconfig atm0 down', '2>/dev/null');
!
if ($pppsettings{'TYPE'} ne '3cp4218usbadsl') { system('/sbin/modprobe', '-r', \
'3cp4218');} if ($pppsettings{'TYPE'} ne 'alcatelusbk') { system('/sbin/modprobe', \
'-r', 'speedtch');} if ($pppsettings{'TYPE'} ne 'amedynusbadsl') { \
system('/sbin/modprobe', '-r', 'amedyn');} if ($pppsettings{'TYPE'} ne 'bewanadsl') \
{
! system('/sbin/modprobe', '-r', 'unicorn_pci_atm');
! system('/sbin/modprobe', '-r', 'unicorn_usb_atm');
! }
if ($pppsettings{'TYPE'} ne 'conexantpciadsl') { system('/sbin/modprobe', '-r', \
'CnxADSL');} if ($pppsettings{'TYPE'} ne 'conexantusbadsl') { \
system('/sbin/modprobe', '-r', 'cxacru');} if ($pppsettings{'TYPE'} ne \
'eagleusbadsl') { system('/sbin/modprobe', '-r', 'eagle-usb');}
! if ($pppsettings{'TYPE'} ne 'fritzdsl') { system('/sbin/modprobe', '-r', \
'fcdsl');} if ($pppsettings{'TYPE'} ne 'pulsardsl') { system('/sbin/modprobe', \
'-r', 'pulsar');} if ($pppsettings{'TYPE'} !=~ \
/^(3cp4218usbadsl|alcatelusbk|amedynusbadsl|bewanadsl|conexantpciadsl|pulsardsl)$/) { \
system('/sbin/modprobe', '-r', 'atm');
--- 75,91 ----
system('/bin/killall /usr/bin/br2684ctl 2>/dev/null');
system('/sbin/modprobe', '-r', 'br2684');
!
if ($pppsettings{'TYPE'} ne '3cp4218usbadsl') { system('/sbin/modprobe', '-r', \
'3cp4218');} if ($pppsettings{'TYPE'} ne 'alcatelusbk') { system('/sbin/modprobe', \
'-r', 'speedtch');} if ($pppsettings{'TYPE'} ne 'amedynusbadsl') { \
system('/sbin/modprobe', '-r', 'amedyn');} if ($pppsettings{'TYPE'} ne 'bewanadsl') \
{
! system('/sbin/modprobe', '-r', 'unicorn_pci_atm', 'unicorn_usb_atm');}
if ($pppsettings{'TYPE'} ne 'conexantpciadsl') { system('/sbin/modprobe', '-r', \
'CnxADSL');} if ($pppsettings{'TYPE'} ne 'conexantusbadsl') { \
system('/sbin/modprobe', '-r', 'cxacru');} if ($pppsettings{'TYPE'} ne \
'eagleusbadsl') { system('/sbin/modprobe', '-r', 'eagle-usb');}
! if ($pppsettings{'TYPE'} ne 'fritzdsl') {
! system('/sbin/modprobe', '-r', 'fcdsl', 'fcdsl2', 'fcdslsl', 'fcdslusb', \
'fcdslslusb');} if ($pppsettings{'TYPE'} ne 'pulsardsl') { system('/sbin/modprobe', \
'-r', 'pulsar');} + sleep 1;
if ($pppsettings{'TYPE'} !=~ \
/^(3cp4218usbadsl|alcatelusbk|amedynusbadsl|bewanadsl|conexantpciadsl|pulsardsl)$/) { \
system('/sbin/modprobe', '-r', 'atm');
***************
*** 101,108 ****
if ($ARGV[0] eq 'start') {
! if (-e "${swroot}/red/active" ||
-e '/var/run/ppp-ipcop.pid')
{
! &log ("ERROR: Can't start RED when it's still active");
exit 1;
}
--- 98,105 ----
if ($ARGV[0] eq 'start') {
! if (-e "${General::swroot}/red/active" ||
-e '/var/run/ppp-ipcop.pid')
{
! &General::log ("ERROR: Can't start RED when it's still active");
exit 1;
}
***************
*** 121,129 ****
if ($netsettings{'RED_DEV'} ne '')
{
! &log("Starting RED device $netsettings{'RED_DEV'}.");
if ( $netsettings{'RED_TYPE'} eq 'DHCP')
{
! if (open(FILE, ">${swroot}/red/iface")) { print FILE $netsettings{'RED_DEV'}; \
close FILE; }
dodhcpdial($netsettings{'RED_DEV'},$netsettings{'RED_DHCP_HOSTNAME'});
exit 0;
--- 118,126 ----
if ($netsettings{'RED_DEV'} ne '')
{
! &General::log("Starting RED device $netsettings{'RED_DEV'}.");
if ( $netsettings{'RED_TYPE'} eq 'DHCP')
{
! if (open(FILE, ">${General::swroot}/red/iface")) { print FILE \
$netsettings{'RED_DEV'}; close FILE; }
dodhcpdial($netsettings{'RED_DEV'},$netsettings{'RED_DHCP_HOSTNAME'});
exit 0;
***************
*** 131,136 ****
elsif ( ( $netsettings{'RED_TYPE'} eq 'PPTP') && ( $pppsettings{'METHOD'} eq \
'DHCP') ) {
! if (open(FILE, ">${swroot}/red/device")) { print FILE $netsettings{'RED_DEV'}; \
close FILE; }
! unlink ("${swroot}/red/iface");
dodhcpdial($netsettings{'RED_DEV'},$netsettings{'RED_DHCP_HOSTNAME'});
}
--- 128,133 ----
elsif ( ( $netsettings{'RED_TYPE'} eq 'PPTP') && ( $pppsettings{'METHOD'} eq \
'DHCP') ) {
! if (open(FILE, ">${General::swroot}/red/device")) { print FILE \
$netsettings{'RED_DEV'}; close FILE; }
! unlink ("${General::swroot}/red/iface");
dodhcpdial($netsettings{'RED_DEV'},$netsettings{'RED_DHCP_HOSTNAME'});
}
***************
*** 145,155 ****
{
system("/usr/local/bin/setaliases");
! system("echo $netsettings{'DNS1'} > ${swroot}/red/dns1");
! system("echo $netsettings{'DNS2'} > ${swroot}/red/dns2");
! system("echo $netsettings{'RED_ADDRESS'} > ${swroot}/red/local-ipaddress");
! system("echo $netsettings{'DEFAULT_GATEWAY'} > \
${swroot}/red/remote-ipaddress"); } elsif ( $netsettings{'RED_TYPE'} eq 'PPTP' ) {
! if (open(FILE, ">${swroot}/red/device")) { print FILE $netsettings{'RED_DEV'}; \
close FILE; }
! unlink ("${swroot}/red/iface");
}
if ( $netsettings{'DEFAULT_GATEWAY'} ne '' )
--- 142,152 ----
{
system("/usr/local/bin/setaliases");
! system("echo $netsettings{'DNS1'} > ${General::swroot}/red/dns1");
! system("echo $netsettings{'DNS2'} > ${General::swroot}/red/dns2");
! system("echo $netsettings{'RED_ADDRESS'} > \
${General::swroot}/red/local-ipaddress");
! system("echo $netsettings{'DEFAULT_GATEWAY'} > \
${General::swroot}/red/remote-ipaddress"); } elsif ( $netsettings{'RED_TYPE'} eq \
'PPTP' ) {
! if (open(FILE, ">${General::swroot}/red/device")) { print FILE \
$netsettings{'RED_DEV'}; close FILE; }
! unlink ("${General::swroot}/red/iface");
}
if ( $netsettings{'DEFAULT_GATEWAY'} ne '' )
***************
*** 168,173 ****
if ( $netsettings{'RED_TYPE'} eq 'STATIC')
{
! if (open(FILE, ">${swroot}/red/iface")) { print FILE $netsettings{'RED_DEV'}; \
close FILE; }
! system ("/bin/touch", "${swroot}/red/active");
system ("/etc/rc.d/rc.updatered");
exit 0;
--- 165,170 ----
if ( $netsettings{'RED_TYPE'} eq 'STATIC')
{
! if (open(FILE, ">${General::swroot}/red/iface")) { print FILE \
$netsettings{'RED_DEV'}; close FILE; }
! system ("/bin/touch", "${General::swroot}/red/active");
system ("/etc/rc.d/rc.updatered");
exit 0;
***************
*** 176,180 ****
else
{
! &log ("ERROR: Can't start RED when RED device not set!");
exit 1;
}
--- 173,177 ----
else
{
! &General::log ("ERROR: Can't start RED when RED device not set!");
exit 1;
}
***************
*** 184,196 ****
if ($pppsettings{'RECONNECTION'} eq 'dialondemand')
{
! system ('/bin/touch', "${swroot}/red/dial-on-demand");
}
if ($pppsettings{'VALID'} ne 'yes') {
! &log("Profile has errors.");
exit 1;
}
! if (-e "${swroot}/ppp/updatesettings") {
&doupdatesettings;
}
--- 181,193 ----
if ($pppsettings{'RECONNECTION'} eq 'dialondemand')
{
! system ('/bin/touch', "${General::swroot}/red/dial-on-demand");
}
if ($pppsettings{'VALID'} ne 'yes') {
! &General::log("Profile has errors.");
exit 1;
}
! if (-e "${General::swroot}/ppp/updatesettings") {
&doupdatesettings;
}
***************
*** 198,207 ****
if (( $pppsettings{'METHOD'} eq 'STATIC') && ( $pppsettings{'DNS'} eq 'Manual')) {
system("/usr/local/bin/setaliases");
! if (open(FILE, ">${swroot}/red/dns1")) { print FILE $pppsettings{'DNS1'}; close \
FILE; }
! if (open(FILE, ">${swroot}/red/dns2")) { print FILE $pppsettings{'DNS2'}; close \
FILE; }
! if (open(FILE, ">${swroot}/red/local-ipaddress")) { print FILE \
$pppsettings{'IP'}; close FILE; }
! if (open(FILE, ">${swroot}/red/remote-ipaddress")) { print FILE \
$pppsettings{'GATEWAY'}; close FILE; } }
- &log("Dialing $pppsettings{'PROFILENAME'}.");
if ($pppsettings{'TYPE'} eq 'modem') { &domodemdial(); }
--- 195,208 ----
if (( $pppsettings{'METHOD'} eq 'STATIC') && ( $pppsettings{'DNS'} eq 'Manual')) {
system("/usr/local/bin/setaliases");
! if (open(FILE, ">${General::swroot}/red/dns1")) { print FILE \
$pppsettings{'DNS1'}; close FILE; }
! if (open(FILE, ">${General::swroot}/red/dns2")) { print FILE \
$pppsettings{'DNS2'}; close FILE; }
! if (open(FILE, ">${General::swroot}/red/local-ipaddress")) { print FILE \
$pppsettings{'IP'}; close FILE; }
! if (open(FILE, ">${General::swroot}/red/remote-ipaddress")) { print FILE \
$pppsettings{'GATEWAY'}; close FILE; }
! }
! if ($pppsettings{'RECONNECTION'} eq 'dialondemand') {
! &General::log("Dial-on-Demand waiting to dial $pppsettings{'PROFILENAME'}.");
! } else {
! &General::log("Dialling $pppsettings{'PROFILENAME'}.");
}
if ($pppsettings{'TYPE'} eq 'modem') { &domodemdial(); }
***************
*** 222,228 ****
elsif ($pppsettings{'TYPE'} eq '3cp4218usbadsl') { &do3cp4218usbadsldial(); }
! if (-e "${swroot}/ppp/updatesettings") {
# erase update mark only after specific script had run, allowing specific script \
to treat the update
! unlink ("${swroot}/ppp/updatesettings");
}
if ( ($pppsettings{'RECONNECTION'} eq 'dialondemand') || ($pppsettings{'METHOD'} \
eq 'STATIC') ){
--- 223,229 ----
elsif ($pppsettings{'TYPE'} eq '3cp4218usbadsl') { &do3cp4218usbadsldial(); }
! if (-e "${General::swroot}/ppp/updatesettings") {
# erase update mark only after specific script had run, allowing specific script \
to treat the update
! unlink ("${General::swroot}/ppp/updatesettings");
}
if ( ($pppsettings{'RECONNECTION'} eq 'dialondemand') || ($pppsettings{'METHOD'} \
eq 'STATIC') ){
***************
*** 232,236 ****
elsif ($ARGV[0] eq 'stop')
{
! if (open(IFACE, "${swroot}/red/iface")) {
$iface = <IFACE>;
close IFACE;
--- 233,237 ----
elsif ($ARGV[0] eq 'stop')
{
! if (open(IFACE, "${General::swroot}/red/iface")) {
$iface = <IFACE>;
close IFACE;
***************
*** 239,244 ****
}
! if (open(FILE, "${swroot}/red/device")) {
! my $device = <FILE>;
close FILE;
chomp ($device);
--- 240,246 ----
}
! my $device;
! if (open(FILE, "${General::swroot}/red/device")) {
! $device = <FILE>;
close FILE;
chomp ($device);
***************
*** 246,263 ****
}
! unlink "${swroot}/red/dial-on-demand";
! unlink "${swroot}/red/active";
! unlink "${swroot}/red/local-ipaddress";
! unlink "${swroot}/red/remote-ipaddress";
! unlink "${swroot}/red/dns1";
! unlink "${swroot}/red/dns2";
! unlink "${swroot}/red/resolv.conf";
! unlink "${swroot}/red/device";
# stay with keepconnected during transitional rc.red stop ordered by \
rc.connectioncheck
! if ( ! -e "${swroot}/red/redial") {
! unlink "${swroot}/red/keepconnected";
}
! unlink "${swroot}/red/redial";
# Kill PPPD
--- 248,265 ----
}
! unlink "${General::swroot}/red/dial-on-demand";
! unlink "${General::swroot}/red/active";
! unlink "${General::swroot}/red/local-ipaddress";
! unlink "${General::swroot}/red/remote-ipaddress";
! unlink "${General::swroot}/red/dns1";
! unlink "${General::swroot}/red/dns2";
! unlink "${General::swroot}/red/resolv.conf";
! unlink "${General::swroot}/red/device";
# stay with keepconnected during transitional rc.red stop ordered by \
rc.connectioncheck
! if ( ! -e "${General::swroot}/red/redial") {
! unlink "${General::swroot}/red/keepconnected";
}
! unlink "${General::swroot}/red/redial";
# Kill PPPD
***************
*** 278,282 ****
}
! while (($file = glob("${swroot}/dhcpc/dhcpcd-*.pid") )) {
if (open(FILE, $file)) {
my $pid = <FILE>;
--- 280,285 ----
}
! my $file;
! while (($file = glob("${General::swroot}/dhcpc/dhcpcd-*.pid") )) {
if (open(FILE, $file)) {
my $pid = <FILE>;
***************
*** 288,291 ****
--- 291,302 ----
}
+ if (!system ('/bin/ps -ef | /bin/grep -q [a]tmarpd')) {
+ if ($pppsettings{'GATEWAY'} ne '') {
+ system('/usr/sbin/atmarp', '-d', $pppsettings{'GATEWAY'}, '2>/dev/null'); }
+ system('/bin/killall /usr/sbin/atmarpd 2>/dev/null');
+ system ('/sbin/ifconfig', 'atm0', 'down');
+ system('/sbin/modprobe', '-r', 'clip');
+ }
+
if ($pppsettings{'TYPE'} eq 'isdn') { system('/etc/rc.d/rc.isdn','stop'); }
if ($pppsettings{'TYPE'} eq 'eciadsl') { system('/etc/rc.d/rc.eciadsl', 'stop'); \
}
***************
*** 297,300 ****
--- 308,312 ----
if ($pppsettings{'TYPE'} eq 'conexantusbadsl') { \
system('/etc/rc.d/rc.conexantusbadsl', 'stop'); } if ($pppsettings{'TYPE'} eq \
'eagleusbadsl') { system('/etc/rc.d/rc.eagleusbadsl', 'stop'); } + if \
($pppsettings{'TYPE'} eq 'fritzdsl') { system ('/etc/rc.d/rc.fritzdsl','stop'); } \
if ($pppsettings{'TYPE'} eq 'pulsardsl') { system('/etc/rc.d/rc.pulsardsl', 'stop'); \
} if ($pppsettings{'TYPE'} eq '3cp4218usbadsl') { \
system('/etc/rc.d/rc.3cp4218usbadsl', 'stop'); }
***************
*** 320,324 ****
if ($pppsettings{'TYPE'} eq 'eciadsl') { system('/etc/rc.d/rc.eciadsl', \
'cleanup'); } if ($pppsettings{'TYPE'} eq 'pulsardsl') { \
system('/etc/rc.d/rc.pulsardsl', 'cleanup'); }
! if ($pppsettings{'TYPE'} eq 'fritzdsl') { system \
('/etc/rc.d/rc.fritzdsl','stop'); } if ($pppsettings{'TYPE'} eq 'bewanadsl') { \
system('/etc/rc.d/rc.bewanadsl', 'cleanup'); } if ($pppsettings{'TYPE'} eq \
'eagleusbadsl') { system('/etc/rc.d/rc.eagleusbadsl', 'cleanup'); }
--- 332,336 ----
if ($pppsettings{'TYPE'} eq 'eciadsl') { system('/etc/rc.d/rc.eciadsl', \
'cleanup'); } if ($pppsettings{'TYPE'} eq 'pulsardsl') { \
system('/etc/rc.d/rc.pulsardsl', 'cleanup'); }
! if ($pppsettings{'TYPE'} eq 'fritzdsl') { system \
('/etc/rc.d/rc.fritzdsl','cleanup'); } if ($pppsettings{'TYPE'} eq 'bewanadsl') { \
system('/etc/rc.d/rc.bewanadsl', 'cleanup'); } if ($pppsettings{'TYPE'} eq \
'eagleusbadsl') { system('/etc/rc.d/rc.eagleusbadsl', 'cleanup'); }
***************
*** 442,446 ****
if (system ('/etc/rc.d/rc.isdn', 'start')) {
! &log ("ERROR: ISDN module failed to load");
exit 1;
}
--- 454,458 ----
if (system ('/etc/rc.d/rc.isdn', 'start')) {
! &General::log ("ERROR: ISDN module failed to load");
exit 1;
}
***************
*** 593,597 ****
system ('/sbin/modprobe pppoe');
my @pppcommand = ('/usr/sbin/pppd');
! push(@pppcommand,'plugin','/usr/lib/pppd/2.4.2/rp-pppoe.so',"$netsettings{'RED_DEV'}");
if ($pppsettings{'DNS'} eq 'Automatic') {
push(@pppcommand, ('usepeerdns'));
--- 605,609 ----
system ('/sbin/modprobe pppoe');
my @pppcommand = ('/usr/sbin/pppd');
! push(@pppcommand,'plugin','rp-pppoe.so',"$netsettings{'RED_DEV'}");
if ($pppsettings{'DNS'} eq 'Automatic') {
push(@pppcommand, ('usepeerdns'));
***************
*** 629,639 ****
sub dopptpdial
{
! $routerip = $pppsettings{'ROUTERIP'} ? $pppsettings{'ROUTERIP'} : "10.0.0.138";
! if ( $pppsettings{'METHOD'} eq 'DHCP' && open(FILE, "${swroot}/red/device")) {
my $device = <FILE>;
close FILE;
chomp ($device);
$device =~ /([a-zA-Z0-9]*)/; $device = $1;
! if (&readhash("${swroot}/dhcpc/dhcpcd-$device.info", \%pptpdhcpc)) {
system("/sbin/route add -host $routerip gw $pptpdhcpc{'GATEWAY'}");
} else {
--- 641,652 ----
sub dopptpdial
{
! my %pptpdhcpc;
! my $routerip = $pppsettings{'ROUTERIP'} ? $pppsettings{'ROUTERIP'} : "10.0.0.138";
! if ( $pppsettings{'METHOD'} eq 'DHCP' && open(FILE, \
"${General::swroot}/red/device")) { my $device = <FILE>;
close FILE;
chomp ($device);
$device =~ /([a-zA-Z0-9]*)/; $device = $1;
! if (&General::readhash("${General::swroot}/dhcpc/dhcpcd-$device.info", \
\%pptpdhcpc)) { system("/sbin/route add -host $routerip gw $pptpdhcpc{'GATEWAY'}");
} else {
***************
*** 661,665 ****
if ($pppsettings{'RECONNECTION'} ne 'persistent') {
if ($pppsettings{'TIMEOUT'} != 0) {
! $seconds = $pppsettings{'TIMEOUT'} * 60;
push(@pppcommand, ('idle', "$seconds"));
}
--- 674,678 ----
if ($pppsettings{'RECONNECTION'} ne 'persistent') {
if ($pppsettings{'TIMEOUT'} != 0) {
! my $seconds = $pppsettings{'TIMEOUT'} * 60;
push(@pppcommand, ('idle', "$seconds"));
}
***************
*** 688,697 ****
{
if (system ('/etc/rc.d/rc.alcatelusb','start')) {
! &log( "ERROR: Failed to connect to Alcatel USB modem");
exit 1;
}
if ($pppsettings{'PROTOCOL'} eq 'RFC1483') {
! if (open(FILE, ">${swroot}/red/device")) { print FILE 'tap0'; close FILE; }
$netsettings{'RED_DEV'} = 'tap0';
&dopppoedial();
--- 701,710 ----
{
if (system ('/etc/rc.d/rc.alcatelusb','start')) {
! &General::log( "ERROR: Failed to connect to Alcatel USB modem");
exit 1;
}
if ($pppsettings{'PROTOCOL'} eq 'RFC1483') {
! if (open(FILE, ">${General::swroot}/red/device")) { print FILE 'tap0'; close \
FILE; } $netsettings{'RED_DEV'} = 'tap0';
&dopppoedial();
***************
*** 741,745 ****
{
if (system ('/etc/rc.d/rc.eciadsl','start')) {
! &log ("ERROR: ECI ADSL failed to start");
exit 1;
}
--- 754,758 ----
{
if (system ('/etc/rc.d/rc.eciadsl','start')) {
! &General::log ("ERROR: ECI ADSL failed to start");
exit 1;
}
***************
*** 751,758 ****
}
! if (open(FILE, ">${swroot}/red/iface")) { print FILE $iface; close FILE; }
if ($pppsettings {'METHOD'} =~ /^(PPPOE|PPPOE_PLUGIN)$/) {
! if (open(FILE, ">${swroot}/red/device")) { print FILE $iface; close FILE; }
$netsettings{'RED_DEV'} = $iface;
&dopppoedial();
--- 764,771 ----
}
! if (open(FILE, ">${General::swroot}/red/iface")) { print FILE $iface; close FILE; \
}
if ($pppsettings {'METHOD'} =~ /^(PPPOE|PPPOE_PLUGIN)$/) {
! if (open(FILE, ">${General::swroot}/red/device")) { print FILE $iface; close \
FILE; } $netsettings{'RED_DEV'} = $iface;
&dopppoedial();
***************
*** 765,788 ****
system (@staticcommand);
system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'});
! system ("/bin/touch", "${swroot}/red/active");
} elsif ($pppsettings {'METHOD'} eq 'DHCP') {
dodhcpdial($iface,$pppsettings{'DHCP_HOSTNAME'});
}
} else {
# PPPoA
! open (MODEMS, "${swroot}/eciadsl/modems.db") or die 'Unable to open modems \
database.';
! while ($line = <MODEMS>) {
$line =~ s/\s*\t+\s*/|/g;
! $line =~ /^(.+)\|(.+)\|(.+)\|(.+)\|(.+)$/;
if ( $1 eq $pppsettings{'MODEM'} ) {
! $VID2=$4 ; $PID2=$5;
}
}
close (MODEMS);
if ( $VID2 eq '') {
! &log("$pppsettings{'MODEM'} not found in modems.db");
exit 1;
}
!
if ($pppsettings {'ENCAP'} eq '1') {
$ECIMODE = "LLC_RFC2364";
--- 778,813 ----
system (@staticcommand);
system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'});
! system ("/bin/touch", "${General::swroot}/red/active");
! if (open(FILE, ">${General::swroot}/red/iface")) { print FILE $iface; close \
FILE; } } elsif ($pppsettings {'METHOD'} eq 'DHCP') {
+ # FIXME dhcp does not support tun0 interface (routed IP)
dodhcpdial($iface,$pppsettings{'DHCP_HOSTNAME'});
}
} else {
# PPPoA
! my ($VID2, $PID2, $CHIP, $ALTP, $BPATH, $ECIMODE);
! open (MODEMS, "/etc/eciadsl/modems.db") or die 'Unable to open modems database.';
! while (my $line = <MODEMS>) {
$line =~ s/\s*\t+\s*/|/g;
! $line =~ /^(.+)\|(.+)\|(.+)\|(.+)\|(.+)\|(.+)\|(.+)\|(.+)$/;
if ( $1 eq $pppsettings{'MODEM'} ) {
! $VID2=$4 ; $PID2=$5; $CHIP=$6; $ALTP=$8;
}
}
close (MODEMS);
if ( $VID2 eq '') {
! &General::log("$pppsettings{'MODEM'} not found in modems.db");
exit 1;
}
! if ( $CHIP eq '' ) {
! &General::log ("error in modems.db reading for $pppsettings{'MODEM'}");
! exit 1;
! } else {
! if ( $CHIP eq 'GS7070' ) {
! $BPATH='bin';
! } else {
! $BPATH='sbin';
! }
! }
if ($pppsettings {'ENCAP'} eq '1') {
$ECIMODE = "LLC_RFC2364";
***************
*** 792,796 ****
my @pppcommand = ('/usr/sbin/pppd', 'pty');
! my @pppoecicommand = ('/usr/bin/pppoeci','-alt \
4','-vpi',$pppsettings{'VPI'},'-vci',$pppsettings{'VCI'}, \
'-vendor',"0x$VID2",'-product',"0x$PID2",'-mode',$ECIMODE); push(@pppcommand, \
"@pppoecicommand");
--- 817,821 ----
my @pppcommand = ('/usr/sbin/pppd', 'pty');
! my @pppoecicommand = ("/usr/$BPATH/eciadsl-pppoeci",'-alt', \
"$ALTP",'-vpi',$pppsettings{'VPI'},'-vci',$pppsettings{'VCI'}, \
'-vendor',"0x$VID2",'-product',"0x$PID2",'-mode',$ECIMODE); push(@pppcommand, \
"@pppoecicommand");
***************
*** 833,841 ****
sub dofritzdsldial
{
if (system ('/etc/rc.d/rc.fritzdsl','start')) {
! &log ("ERROR: Fritz DSL module failed to load");
exit 1;
}
my @pppcommand = ('/usr/sbin/pppd');
my @capiplugin;
--- 858,882 ----
sub dofritzdsldial
{
+ my $controller;
+
if (system ('/etc/rc.d/rc.fritzdsl','start')) {
! &General::log ("ERROR: Fritz DSL module failed to load");
exit 1;
}
+ # controller number
+ if ($pppsettings{'TYPE'} eq 'fritzdsl') {
+ if ( ! system ('/bin/grep', '1244:2700', '/proc/pci')) {
+ $controller=1; # fcdslsl
+ } elsif (! system('/bin/grep', '1244:2900', '/proc/pci')) {
+ $controller=2; # fcdsl2
+ } elsif (! system('/bin/grep', '1131:5402', '/proc/pci')) {
+ $controller=2; # fdsl
+ } elsif (! system('/bin/grep', 'Vendor=057c ProdID=2300', \
'/proc/bus/usb/devices')) { + $controller=1; # fcdslusb
+ } elsif (! system('/bin/grep', 'Vendor=057c ProdID=3500', \
'/proc/bus/usb/devices')) { + $controller=1; # fcdslslusb
+ }
+ }
my @pppcommand = ('/usr/sbin/pppd');
my @capiplugin;
***************
*** 870,881 ****
if ($pppsettings {'PROTOCOL'} eq 'RFC1483') {
@capiplugin = ('plugin', 'capiplugin.so', 'protocol', 'adslpppoe',
! 'controller','2', 'vpi', $pppsettings{'VPI'},'vci',$pppsettings{'VCI'});
} else {
if ($pppsettings {'ENCAP'} eq '1') {
@capiplugin = ('plugin', 'capiplugin.so', 'protocol', 'adslpppoallc',
! 'controller','2', 'vpi', $pppsettings{'VPI'},'vci',$pppsettings{'VCI'});
} else {
@capiplugin = ('plugin', 'capiplugin.so', 'protocol', 'adslpppoa',
! 'controller','2','vpi', $pppsettings{'VPI'},'vci',$pppsettings{'VCI'});
}
}
--- 911,922 ----
if ($pppsettings {'PROTOCOL'} eq 'RFC1483') {
@capiplugin = ('plugin', 'capiplugin.so', 'protocol', 'adslpppoe',
! 'controller', $controller, 'vpi', \
$pppsettings{'VPI'},'vci',$pppsettings{'VCI'}); } else {
if ($pppsettings {'ENCAP'} eq '1') {
@capiplugin = ('plugin', 'capiplugin.so', 'protocol', 'adslpppoallc',
! 'controller', $controller, 'vpi', \
$pppsettings{'VPI'},'vci',$pppsettings{'VCI'}); } else {
@capiplugin = ('plugin', 'capiplugin.so', 'protocol', 'adslpppoa',
! 'controller', $controller,'vpi', \
$pppsettings{'VPI'},'vci',$pppsettings{'VCI'}); }
}
***************
*** 889,893 ****
{
if (system ('/etc/rc.d/rc.eagleusbadsl','start')) {
! &log ("ERROR: EAGLE-USB ADSL $MODEM failed to start");
exit 1;
}
--- 930,934 ----
{
if (system ('/etc/rc.d/rc.eagleusbadsl','start')) {
! &General::log ("ERROR: EAGLE-USB ADSL MODEM failed to start");
exit 1;
}
***************
*** 896,902 ****
if ($pppsettings {'PROTOCOL'} eq 'RFC1483') {
! if (open(FILE, ">${swroot}/red/iface")) { print FILE $iface; close FILE; }
if ($pppsettings {'METHOD'} =~ /^(PPPOE|PPPOE_PLUGIN)$/) {
! if (open(FILE, ">${swroot}/red/device")) { print FILE $iface; close FILE; }
$netsettings{'RED_DEV'} = $iface;
&dopppoedial();
--- 937,943 ----
if ($pppsettings {'PROTOCOL'} eq 'RFC1483') {
! if (open(FILE, ">${General::swroot}/red/iface")) { print FILE $iface; close FILE; \
} if ($pppsettings {'METHOD'} =~ /^(PPPOE|PPPOE_PLUGIN)$/) {
! if (open(FILE, ">${General::swroot}/red/device")) { print FILE $iface; close \
FILE; } $netsettings{'RED_DEV'} = $iface;
&dopppoedial();
***************
*** 909,913 ****
system (@staticcommand);
system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'});
! system ("/bin/touch", "${swroot}/red/active");
} elsif ($pppsettings {'METHOD'} eq 'DHCP') {
dodhcpdial($iface,$pppsettings{'DHCP_HOSTNAME'});
--- 950,954 ----
system (@staticcommand);
system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'});
! system ("/bin/touch", "${General::swroot}/red/active");
} elsif ($pppsettings {'METHOD'} eq 'DHCP') {
dodhcpdial($iface,$pppsettings{'DHCP_HOSTNAME'});
***************
*** 915,919 ****
} else {
# PPPoA
! if (open(FILE, ">${swroot}/red/device")) { print FILE $iface; close FILE; }
$netsettings{'RED_DEV'} = $iface;
my @pppcommand = ('/usr/sbin/pppd','pty');
--- 956,960 ----
} else {
# PPPoA
! if (open(FILE, ">${General::swroot}/red/device")) { print FILE $iface; close \
FILE; } $netsettings{'RED_DEV'} = $iface;
my @pppcommand = ('/usr/sbin/pppd','pty');
***************
*** 957,961 ****
{
if (system ('/etc/rc.d/rc.pulsardsl','start')) {
! &log ("ERROR: PULSAR ADSL modem failed to start");
exit 1;
}
--- 998,1002 ----
{
if (system ('/etc/rc.d/rc.pulsardsl','start')) {
! &General::log ("ERROR: PULSAR ADSL modem failed to start");
exit 1;
}
***************
*** 966,970 ****
{
if (system ('/etc/rc.d/rc.bewanadsl','start')) {
! &log ("ERROR: Bewan ADSL $MODEM failed to start");
exit 1;
}
--- 1007,1011 ----
{
if (system ('/etc/rc.d/rc.bewanadsl','start')) {
! &General::log ("ERROR: Bewan ADSL MODEM failed to start");
exit 1;
}
***************
*** 975,979 ****
{
if (system ('/etc/rc.d/rc.alcatelusbk','start')) {
! &log ("ERROR: Alcatel USB kernel mode driver failed to start");
exit 1;
}
--- 1016,1020 ----
{
if (system ('/etc/rc.d/rc.alcatelusbk','start')) {
! &General::log ("ERROR: Alcatel USB kernel mode driver failed to start");
exit 1;
}
***************
*** 984,988 ****
{
if (system ('/etc/rc.d/rc.conexantusbadsl','start')) {
! &log ("ERROR: Conexant USB ADSL modem failed to start");
exit 1;
}
--- 1025,1029 ----
{
if (system ('/etc/rc.d/rc.conexantusbadsl','start')) {
! &General::log ("ERROR: Conexant USB ADSL modem failed to start");
exit 1;
}
***************
*** 994,998 ****
{
if (system ('/etc/rc.d/rc.conexantpciadsl','start')) {
! &log ("ERROR: Conexant PCI ADSL modem failed to start");
exit 1;
}
--- 1035,1039 ----
{
if (system ('/etc/rc.d/rc.conexantpciadsl','start')) {
! &General::log ("ERROR: Conexant PCI ADSL modem failed to start");
exit 1;
}
***************
*** 1004,1008 ****
{
if (system ('/etc/rc.d/rc.amedynusbadsl','start')) {
! &log ("ERROR: Zyxel 630-11/Asus AAM6000UG USB ADSL modem failed to start");
exit 1;
}
--- 1045,1049 ----
{
if (system ('/etc/rc.d/rc.amedynusbadsl','start')) {
! &General::log ("ERROR: Zyxel 630-11/Asus AAM6000UG USB ADSL modem failed to \
start"); exit 1;
}
***************
*** 1014,1018 ****
{
if (system ('/etc/rc.d/rc.3cp4218usbadsl','start')) {
! &log ("ERROR: 3Com USB AccessRunner modem failed to start");
exit 1;
}
--- 1055,1059 ----
{
if (system ('/etc/rc.d/rc.3cp4218usbadsl','start')) {
! &General::log ("ERROR: 3Com USB AccessRunner modem failed to start");
exit 1;
}
***************
*** 1022,1031 ****
sub doatmdial
{
if ($pppsettings {'PROTOCOL'} eq 'RFC2364') {
system ('/sbin/modprobe pppoatm');
my @pppcommand = ('/usr/sbin/pppd');
if ($pppsettings{'ENCAP'} eq '0') { $ENCAP='vc-encaps'; } else { \
$ENCAP='llc-encaps'; }
! push(@pppcommand,'plugin',
! '/usr/lib/pppd/2.4.2/pppoatm.so',$pppsettings{'VPI'}.".".$pppsettings{'VCI'},"$ENCAP");
if ($pppsettings{'DNS'} eq 'Automatic') { push(@pppcommand, ('usepeerdns'));}
if ($pppsettings{'AUTH'} eq 'pap') {
--- 1063,1072 ----
sub doatmdial
{
+ my $ENCAP;
if ($pppsettings {'PROTOCOL'} eq 'RFC2364') {
system ('/sbin/modprobe pppoatm');
my @pppcommand = ('/usr/sbin/pppd');
if ($pppsettings{'ENCAP'} eq '0') { $ENCAP='vc-encaps'; } else { \
$ENCAP='llc-encaps'; }
! push(@pppcommand,'plugin', \
'pppoatm.so',$pppsettings{'VPI'}.".".$pppsettings{'VCI'},"$ENCAP"); if \
($pppsettings{'DNS'} eq 'Automatic') { push(@pppcommand, ('usepeerdns'));} if \
($pppsettings{'AUTH'} eq 'pap') {
***************
*** 1061,1065 ****
my $itf='0';
my $device = "nas$itf";
! if (open(FILE, ">${swroot}/red/device")) { print FILE $device; close FILE; }
$netsettings{'RED_DEV'} = $device;
if (system ('/bin/ps -ef | /bin/grep -q [b]r2684ctl')) {
--- 1102,1106 ----
my $itf='0';
my $device = "nas$itf";
! if (open(FILE, ">${General::swroot}/red/device")) { print FILE $device; close \
FILE; } $netsettings{'RED_DEV'} = $device;
if (system ('/bin/ps -ef | /bin/grep -q [b]r2684ctl')) {
***************
*** 1073,1077 ****
my $itf='0';
$iface = "nas$itf";
! if (open(FILE, ">${swroot}/red/iface")) { print FILE $iface; close FILE; }
if (system ('/bin/ps -ef | /bin/grep -q [b]r2684ctl')) {
system ('/sbin/modprobe br2684');
--- 1114,1118 ----
my $itf='0';
$iface = "nas$itf";
! if (open(FILE, ">${General::swroot}/red/iface")) { print FILE $iface; close \
FILE; } if (system ('/bin/ps -ef | /bin/grep -q [b]r2684ctl')) {
system ('/sbin/modprobe br2684');
***************
*** 1089,1093 ****
system (@staticcommand);
system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'});
! system ("/bin/touch", "${swroot}/red/active");
} elsif ($pppsettings {'METHOD'} eq 'DHCP') {
dodhcpdial($iface,$pppsettings{'DHCP_HOSTNAME'});
--- 1130,1135 ----
system (@staticcommand);
system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'});
! system ("/bin/touch", "${General::swroot}/red/active");
! system ("/etc/rc.d/rc.updatered");
} elsif ($pppsettings {'METHOD'} eq 'DHCP') {
dodhcpdial($iface,$pppsettings{'DHCP_HOSTNAME'});
***************
*** 1096,1129 ****
my $itf='0';
$iface = "atm$itf";
! if (open(FILE, ">${swroot}/red/iface")) { print FILE $iface; close FILE; }
if ($pppsettings{'ENCAP'} eq '2') { $ENCAP=''; } else { $ENCAP='null'; }
if (system ('/bin/ps -ef | /bin/grep -q [a]tmarpd')) {
if (system ('/usr/sbin/atmarpd -b -l syslog')) {
! &log('atmarpd success');
! } else {
! &log('atmarpd fail');
exit 1;
}
-
if (system ("/usr/sbin/atmarp -c $iface")) {
! &log("creation of $iface success");
! } else {
! &log("creation of $iface fail");
exit 1;
}
! }
! if ($pppsettings{'METHOD'} eq 'STATIC') {
! my @staticcommand = ('/sbin/ifconfig');
! push(@staticcommand, ($iface, $pppsettings{'IP'},'netmask', \
$pppsettings{'NETMASK'},'mtu 1500 up'));
! if ($pppsettings{'BROADCAST'} ne '') {
! push(@staticcommand, ('broadcast', $pppsettings{'BROADCAST'}));
}
- system (@staticcommand);
- system ('/usr/sbin/atmarp', '-s', \
$pppsettings{'GATEWAY'},"itf.".$pppsettings{'VPI'}.".".$pppsettings{'VCI'},$ENCAP);
- system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'});
- system ("/bin/touch", "${swroot}/red/active");
}
}
}
}
-
--- 1138,1167 ----
my $itf='0';
$iface = "atm$itf";
! if (open(FILE, ">${General::swroot}/red/iface")) { print FILE $iface; close \
FILE; }
if ($pppsettings{'ENCAP'} eq '2') { $ENCAP=''; } else { $ENCAP='null'; }
if (system ('/bin/ps -ef | /bin/grep -q [a]tmarpd')) {
if (system ('/usr/sbin/atmarpd -b -l syslog')) {
! &General::log('atmarpd fail');
exit 1;
}
if (system ("/usr/sbin/atmarp -c $iface")) {
! &General::log("creation of $iface fail");
exit 1;
}
! if ($pppsettings{'METHOD'} eq 'STATIC') {
! my @staticcommand = ('/sbin/ifconfig');
! push(@staticcommand, ($iface, $pppsettings{'IP'},'netmask', \
$pppsettings{'NETMASK'}, 'up'));
! if ($pppsettings{'BROADCAST'} ne '') {
! push(@staticcommand, ('broadcast', $pppsettings{'BROADCAST'}));
! }
! system (@staticcommand);
! # we have to wait a bit before launching atmarp -s
! sleep 2;
! system ('/usr/sbin/atmarp', '-s', \
$pppsettings{'GATEWAY'},"$itf.$pppsettings{'VPI'}.$pppsettings{'VCI'}", \
$ENCAP);
! system ("/sbin/route", "add", "default", "gw", $pppsettings{'GATEWAY'});
! system ("/bin/touch", "${General::swroot}/red/active");
}
}
}
}
}
Index: rc.alcatelusb
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.alcatelusb,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** rc.alcatelusb 30 Sep 2004 07:49:05 -0000 1.10
--- rc.alcatelusb 29 Mar 2005 18:45:35 -0000 1.11
***************
*** 46,52 ****
exit 1
;;
! '0.00' | '2.00')
modem='v0123'
! # Speedtouch Rev 0.01 Annex B (ISDN) or 530 aka Rev 3.00 does not work actually
;;
'4.00')
--- 46,52 ----
exit 1
;;
! '0.00' | '0.01' | '2.00')
modem='v0123'
! # Speedtouch 530 aka Rev 3.00 does not work actually
;;
'4.00')
***************
*** 54,58 ****
;;
*)
! msg "Unknow version or unsupported model Rev $speedtouch"
exit 1
;;
--- 54,58 ----
;;
*)
! msg "Unknown version or unsupported model Rev $speedtouch"
exit 1
;;
Index: rc.updatered
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.updatered,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** rc.updatered 20 Sep 2004 13:42:36 -0000 1.13
--- rc.updatered 29 Mar 2005 18:45:35 -0000 1.14
***************
*** 1,4 ****
--- 1,20 ----
#!/bin/sh
+ if [ ! -e /var/lock/rc.updatered.lock ]; then
+ /bin/touch /var/lock/rc.updatered.lock
+ /usr/bin/logger -s -p local0.info -t rc.updatered "$0 locking for $$"
+ else
+ count=0
+ while [ ! $count = 5 ]; do
+ sleep 3
+ if [ ! -e /var/lock/rc.updatered.lock ]; then
+ break
+ else
+ /usr/bin/logger -s -p local0.info -t rc.updatered "$0 $$ waiting unlock"
+ fi
+ ((++count))
+ done
+ fi
+
eval $(/usr/local/bin/readhash CONFIG_ROOT/dhcp/settings)
eval $(/usr/local/bin/readhash CONFIG_ROOT/ethernet/settings)
***************
*** 57,63 ****
###
/bin/killall -KILL dnsmasq 2> /dev/null
DOMopt=""
! [ "$DOMAIN_NAME" ] && DOMopt="-s $DOMAIN_NAME"
if [ -e "CONFIG_ROOT/red/dial-on-demand" -a "$DIALONDEMANDDNS" == "on" -a ! -e \
"CONFIG_ROOT/red/active" ]; then
/usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases $DOMopt -r \
CONFIG_ROOT/ppp/fake-resolv.conf -B 64.94.110.11
--- 73,80 ----
###
/bin/killall -KILL dnsmasq 2> /dev/null
+ sleep 1
DOMopt=""
! [ "$DOMAIN_NAME_GREEN" ] && DOMopt="-s $DOMAIN_NAME_GREEN"
if [ -e "CONFIG_ROOT/red/dial-on-demand" -a "$DIALONDEMANDDNS" == "on" -a ! -e \
"CONFIG_ROOT/red/active" ]; then
/usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases $DOMopt -r \
CONFIG_ROOT/ppp/fake-resolv.conf -B 64.94.110.11
***************
*** 90,96 ****
/usr/local/bin/setportfw
/usr/local/bin/setxtaccess
! /usr/local/bin/setddns.pl
! /usr/local/bin/restartsnort
/usr/local/bin/ipsecctrl S
exit 0
else
--- 107,117 ----
/usr/local/bin/setportfw
/usr/local/bin/setxtaccess
! if [ -s CONFIG_ROOT/ddns/settings ]; then
! /usr/local/bin/setddns.pl
! fi
! /usr/local/bin/restartsnort red
/usr/local/bin/ipsecctrl S
+ /bin/rm -f /var/lock/rc.updatered.lock
+ /usr/bin/logger -s -p local0.info -t rc.updatered "unlocking from $$"
exit 0
else
***************
*** 105,121 ****
esac
fi
if [ -e "CONFIG_ROOT/red/active" ]; then
[ "$IFACE" != "" ] && /sbin/ifconfig $IFACE -multicast
/etc/rc.d/rc.firewall reload
/usr/local/bin/updatelists.pl &
! /usr/local/bin/restartsnort
! unset ENABLED
eval $(/usr/local/bin/readhash CONFIG_ROOT/shaping/settings)
! if [ "$ENABLED" == "on" ]; then
/usr/local/bin/restartshaping
fi
/usr/local/bin/setportfw
/usr/local/bin/setxtaccess
! /usr/local/bin/setddns.pl
/etc/rc.d/helper/writeipac.pl
/usr/sbin/fetchipac -S
--- 126,145 ----
esac
fi
+
if [ -e "CONFIG_ROOT/red/active" ]; then
[ "$IFACE" != "" ] && /sbin/ifconfig $IFACE -multicast
/etc/rc.d/rc.firewall reload
/usr/local/bin/updatelists.pl &
! /usr/local/bin/restartsnort red
! unset ENABLE
eval $(/usr/local/bin/readhash CONFIG_ROOT/shaping/settings)
! if [ "$ENABLE" == "on" ]; then
/usr/local/bin/restartshaping
fi
/usr/local/bin/setportfw
/usr/local/bin/setxtaccess
! if [ -s CONFIG_ROOT/ddns/settings ]; then
! /usr/local/bin/setddns.pl
! fi
/etc/rc.d/helper/writeipac.pl
/usr/sbin/fetchipac -S
***************
*** 125,126 ****
--- 149,152 ----
/etc/rc.d/rc.firewall reload
fi
+ /bin/rm -f /var/lock/rc.updatered.lock
+ /usr/bin/logger -s -p local0.info -t rc.updatered "unlocking from $$"
Index: rc.firewall.local
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.firewall.local,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rc.firewall.local 9 Jun 2004 14:22:04 -0000 1.5
--- rc.firewall.local 29 Mar 2005 18:45:35 -0000 1.6
***************
*** 5,15 ****
case "$1" in
start)
! ## add your 'start' rules here
;;
stop)
! ## add your 'stop' rules here
;;
*)
! echo "Usage: $0 {start|stop}"
esac
-
--- 5,20 ----
case "$1" in
start)
! ## add your 'start' rules here
;;
stop)
! ## add your 'stop' rules here
! ;;
! reload)
! $0 stop
! $0 start
! ## add your 'reload' rules here
;;
*)
! echo "Usage: $0 {start|stop|reload}"
! ;;
esac
Index: rc.eciadsl
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.eciadsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** rc.eciadsl 30 Sep 2004 07:49:06 -0000 1.7
--- rc.eciadsl 29 Mar 2005 18:45:35 -0000 1.8
***************
*** 51,84 ****
fi
! VID1="$(/bin/grep "$MODEM" "CONFIG_ROOT/eciadsl/modems.db" | /usr/bin/tr -s "\t" \
"|" | /usr/bin/cut -d '|' -f 2)"
! PID1="$(/bin/grep "$MODEM" "CONFIG_ROOT/eciadsl/modems.db" | /usr/bin/tr -s "\t" \
"|" | /usr/bin/cut -d '|' -f 3)"
! VID2="$(/bin/grep "$MODEM" "CONFIG_ROOT/eciadsl/modems.db" | /usr/bin/tr -s "\t" \
"|" | /usr/bin/cut -d '|' -f 4)"
! PID2="$(/bin/grep "$MODEM" "CONFIG_ROOT/eciadsl/modems.db" | /usr/bin/tr -s "\t" \
"|" | /usr/bin/cut -d '|' -f 5)"
! if ( ! /bin/grep -q "^P: Vendor=$VID2 ProdID=$PID2" /proc/bus/usb/devices ); then
! # Firmware
if ( /bin/grep -q "^P: Vendor=$VID1 ProdID=$PID1" /proc/bus/usb/devices ); then
msg "Loading Firmware for $MODEM"
! /usr/bin/eci-load1 0x$VID1 0x$PID1 0x$VID2 0x$PID2 \
CONFIG_ROOT/eciadsl/firmware00.bin
! else
! msg "$MODEM modem not found"
! exit 1
fi
! # Modem synch
! CNT=1
! RET=$CNT
! while [ $CNT -le 5 -a $RET -ne 0 ]; do
! msg "$MODEM Synch attempt #$CNT"
! /usr/bin/eci-load2 0x$VID2 0x$PID2 CONFIG_ROOT/eciadsl/synch.bin
RET=$?
! CNT=$(expr $CNT + 1)
! sleep 2
! done
if [ "$RET" -ne "0" ]; then
msg "$MODEM failed to get synchronization, reason:$RET"
exit 1
fi
fi
if [ "$PROTOCOL" = "RFC1483" ]; then
case "$ENCAP" in
--- 51,120 ----
fi
! VID1="$(/bin/grep "$MODEM " "/etc/eciadsl/modems.db" | /usr/bin/tr -s "\t" "|" | \
/usr/bin/cut -d '|' -f 2)"
! PID1="$(/bin/grep "$MODEM " "/etc/eciadsl/modems.db" | /usr/bin/tr -s "\t" "|" | \
/usr/bin/cut -d '|' -f 3)"
! VID2="$(/bin/grep "$MODEM " "/etc/eciadsl/modems.db" | /usr/bin/tr -s "\t" "|" | \
/usr/bin/cut -d '|' -f 4)"
! PID2="$(/bin/grep "$MODEM " "/etc/eciadsl/modems.db" | /usr/bin/tr -s "\t" "|" | \
/usr/bin/cut -d '|' -f 5)"
! CHIP="$(/bin/grep "$MODEM " "/etc/eciadsl/modems.db" | /usr/bin/tr -s "\t" "|" | \
/usr/bin/cut -d '|' -f 6)"
! ALTS="$(/bin/grep "$MODEM " "/etc/eciadsl/modems.db" | /usr/bin/tr -s "\t" "|" | \
/usr/bin/cut -d '|' -f 7)"
! ALTP="$(/bin/grep "$MODEM " "/etc/eciadsl/modems.db" | /usr/bin/tr -s "\t" "|" | \
/usr/bin/cut -d '|' -f 8)"
! if [ "$CHIP" = '' ]; then
! msg "error in modems.db reading for $MODEM"
! exit 1
! else
! if [ "$CHIP" = 'GS7070' ]; then
! BPATH='bin'
! else
! BPATH='sbin'
! fi
! fi
!
! # Firmware
! if [ "$CHIP" = 'GS7070' ]; then
if ( /bin/grep -q "^P: Vendor=$VID1 ProdID=$PID1" /proc/bus/usb/devices ); then
+ /bin/rm -f /var/ipcop/red/eciadsl-synch-done
+ /bin/sleep 2
msg "Loading Firmware for $MODEM"
! /usr/bin/eciadsl-firmware 0x$VID1 0x$PID1 0x$VID2 0x$PID2 \
/etc/eciadsl/firmware00.bin
! RET=$?
! if [ "$RET" -ne "0" ]; then
! msg "$MODEM failed to load firmware, reason: $RET"
! exit 1
! fi
! /bin/sleep 2
fi
+ fi
! if ( ! /bin/grep -q "^P: Vendor=$VID2 ProdID=$PID2" /proc/bus/usb/devices ); then
! msg "$MODEM modem not found"
! exit 1
! fi
!
! # Modem synch
! if [ ! -e "CONFIG_ROOT/red/eciadsl-synch-done" ]; then
! # sbin/eciadsl-synch could be used for both chips: synch quickier for me (Gilles)
! # but since it is alpha code,it is actually selected only with nortek
! if [ "$CHIP" = 'GS7070' ]; then
! CNT=1
! RET=$CNT
! while [ $CNT -le 5 -a $RET -ne 0 ]; do
! msg "$MODEM Synch attempt #$CNT"
! /usr/bin/eciadsl-synch 0x$VID2 0x$PID2 CONFIG_ROOT/eciadsl/synch.bin
! RET=$?
! CNT=$(expr $CNT + 1)
! /bin/sleep 2
! done
! else
! /usr/sbin/eciadsl-synch -alt $ALTS -mc $CHIP 0x$VID2 0x$PID2 \
CONFIG_ROOT/eciadsl/synch.bin RET=$?
! fi
if [ "$RET" -ne "0" ]; then
msg "$MODEM failed to get synchronization, reason:$RET"
exit 1
+ else
+ /bin/touch CONFIG_ROOT/red/eciadsl-synch-done
fi
fi
+
if [ "$PROTOCOL" = "RFC1483" ]; then
case "$ENCAP" in
***************
*** 103,107 ****
fi
/sbin/modprobe tun
! /usr/bin/pppoeci -alt 4 -vpi $VPI -vci $VCI -vendor 0x$VID2 -product 0x$PID2 \
-mode $ECIMODE wait_for_iface $ECIIF
/sbin/ifconfig $ECIIF up
--- 139,143 ----
fi
/sbin/modprobe tun
! /usr/$BPATH/eciadsl-pppoeci -alt $ALTP -vpi $VPI -vci $VCI -vendor 0x$VID2 \
-product 0x$PID2 -mode $ECIMODE wait_for_iface $ECIIF
/sbin/ifconfig $ECIIF up
***************
*** 118,122 ****
# -KILL is necessary because pppoeci ignores sigint
! /bin/killall -KILL pppoeci eci-load1 eci-load2 2> /dev/null
/bin/sleep 1
/sbin/modprobe -r tun
--- 154,158 ----
# -KILL is necessary because pppoeci ignores sigint
! /bin/killall -KILL eciadsl-pppoeci eciadsl-firmware eciadsl-synch 2> /dev/null
/bin/sleep 1
/sbin/modprobe -r tun
***************
*** 125,128 ****
--- 161,165 ----
msg "driver cleanup and USB Bus reset"
/usr/local/bin/resetusb
+ /bin/rm -f CONFIG_ROOT/red/eciadsl-synch-done
;;
*)
Index: rc.netaddress.up
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.netaddress.up,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** rc.netaddress.up 20 Sep 2004 13:42:35 -0000 1.9
--- rc.netaddress.up 29 Mar 2005 18:45:35 -0000 1.10
***************
*** 28,35 ****
# Start DNSMASQ with defaults
! if [ "$DOMAIN_NAME" == "" ]; then
/usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases -B 64.94.110.11
else
! /usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases -B 64.94.110.11 -s \
"$DOMAIN_NAME" fi
--- 28,43 ----
# Start DNSMASQ with defaults
! if [ "$DOMAIN_NAME_GREEN" == "" ]; then
/usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases -B 64.94.110.11
else
! /usr/sbin/dnsmasq -l /var/state/dhcp/dhcpd.leases -B 64.94.110.11 -s \
"$DOMAIN_NAME_GREEN"
! fi
!
! # If RED is ethernet then check furthur...
! if [ "$CONFIG_TYPE" == "2" -o "$CONFIG_TYPE" == "3" -o "$CONFIG_TYPE" == "6" -o \
"$CONFIG_TYPE" == "7" ]; then
! # If we are DHCP or STATIC we have to start automatically
! if [ "$RED_TYPE" == "DHCP" -o "$RED_TYPE" == "STATIC" ]; then
! AUTOCONNECT="on"
! fi
fi
Index: rc.firewall
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.firewall,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** rc.firewall 20 Sep 2004 13:42:35 -0000 1.9
--- rc.firewall 29 Mar 2005 18:45:35 -0000 1.10
***************
*** 245,258 ****
fi
- /sbin/iptables -A INPUT -m limit --limit 10/minute -j LOG --log-prefix "INPUT "
- /sbin/iptables -A FORWARD -m limit --limit 10/minute -j LOG --log-prefix "OUTPUT "
-
# run local firewall configuration, if present
if [ -x /etc/rc.d/rc.firewall.local ]; then
/etc/rc.d/rc.firewall.local stop
fi
;;
reload)
iptables_red
;;
restart)
--- 245,263 ----
fi
# run local firewall configuration, if present
if [ -x /etc/rc.d/rc.firewall.local ]; then
/etc/rc.d/rc.firewall.local stop
fi
+
+ /sbin/iptables -A INPUT -m limit --limit 10/minute -j LOG --log-prefix "INPUT "
+ /sbin/iptables -A FORWARD -m limit --limit 10/minute -j LOG --log-prefix "OUTPUT "
;;
reload)
iptables_red
+
+ # run local firewall configuration, if present
+ if [ -x /etc/rc.d/rc.firewall.local ]; then
+ /etc/rc.d/rc.firewall.local reload
+ fi
;;
restart)
Index: rc.network
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.network,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** rc.network 20 Sep 2004 13:42:35 -0000 1.12
--- rc.network 29 Mar 2005 18:45:35 -0000 1.13
***************
*** 29,32 ****
--- 29,35 ----
# detected at install time, because /etc/pcmcia.conf won't exist.
/etc/rc.d/rc.pcmcia start
+ # Now, just in case we found a PCMCIA USB controller, we'll need to reload
+ # the USB here.
+ /usr/local/bin/resetusb
for NIC in 0 1 2 3; do
Index: rc.sysinit
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.sysinit,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** rc.sysinit 20 Sep 2004 13:42:36 -0000 1.20
--- rc.sysinit 29 Mar 2005 18:45:35 -0000 1.21
***************
*** 169,178 ****
fi
echo "Clearing old files"
rm -f /var/run/{*.pid,*.sem,*.tdb}
rm -f /var/run/dhcpcd-*.pid
! rm -f /var/lock/LCK..tty*
rm -f CONFIG_ROOT/dhcpc/{*.pid,*.cache,*.info}
! rm -f CONFIG_ROOT/red/active
echo "Setting the clock"
--- 169,184 ----
fi
+ echo "Update modules dependencies when necessary"
+ if [ -e /var/run/need-depmod-`uname -r` ]; then
+ /sbin/depmod -a
+ /bin/rm -f /var/run/need-depmod-`uname -r`
+ fi
+
echo "Clearing old files"
rm -f /var/run/{*.pid,*.sem,*.tdb}
rm -f /var/run/dhcpcd-*.pid
! rm -f /var/lock/{LCK..tty*,rc.updatered.lock}
rm -f CONFIG_ROOT/dhcpc/{*.pid,*.cache,*.info}
! rm -f CONFIG_ROOT/red/{active,eciadsl-synch-done}
echo "Setting the clock"
***************
*** 185,195 ****
chmod 0664 /var/run/utmp /var/log/wtmp
! if [ ! -f /etc/isapnp.conf ]; then
! /bin/touch /etc/isapnp.conf
! fi
!
! if [ -x /sbin/isapnp -a -f /etc/isapnp.conf -a ! -f /proc/isapnp ]; then
echo "Running isapnp"
! /sbin/isapnp /etc/isapnp.conf 2>/dev/null
fi
--- 191,197 ----
chmod 0664 /var/run/utmp /var/log/wtmp
! if [ -x /usr/sbin/isapnp -a -f CONFIG_ROOT/isapnp/isapnp.conf -a ! -f /proc/isapnp \
]; then echo "Running isapnp"
! /usr/sbin/isapnp CONFIG_ROOT/isapnp/isapnp.conf 2>/dev/null
fi
***************
*** 232,244 ****
/usr/sbin/syslogd -m 0
echo "Starting klogd"
! /usr/sbin/klogd
echo "Running /etc/rc.d/rc.network"
. /etc/rc.d/rc.network
echo "Starting crond"
/usr/sbin/fcron
echo "Starting Snort (if enabled)"
! /usr/local/bin/restartsnort
echo "Starting httpd"
/usr/sbin/httpd
--- 234,249 ----
/usr/sbin/syslogd -m 0
echo "Starting klogd"
! /usr/sbin/klogd -u klogd -j /var/empty
echo "Running /etc/rc.d/rc.network"
. /etc/rc.d/rc.network
+ echo "Dumping boot messages"
+ dmesg > /var/log/dmesg
+
echo "Starting crond"
/usr/sbin/fcron
echo "Starting Snort (if enabled)"
! /usr/local/bin/restartsnort red blue orange green
echo "Starting httpd"
/usr/sbin/httpd
***************
*** 258,263 ****
. /etc/rc.d/rc.local
- dmesg >/var/log/dmesg
-
logger -t ipcop "IPCop started."
--- 263,266 ----
Index: rc.eagleusbadsl
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.eagleusbadsl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rc.eagleusbadsl 30 Sep 2004 07:49:06 -0000 1.8
--- rc.eagleusbadsl 29 Mar 2005 18:45:35 -0000 1.9
***************
*** 24,27 ****
--- 24,35 ----
exit 1
fi
+
+ if [ "$LINE" != "WO" -a "$LINE" != "FR" -a "$LINE" != "IT" -a "$LINE" != "ES" ]; \
then + LINE='WO' # default CMV value
+ fi
+
+ /bin/ln -f -s /etc/eagle-usb/CMVep$LINE.txt /etc/eagle-usb/CMVep.txt
+ /bin/ln -f -s /etc/eagle-usb/CMVeiWO.txt /etc/eagle-usb/CMVei.txt
+
if ( /sbin/ifconfig | /bin/grep -q "$IFACE" ); then
/sbin/ifconfig "$IFACE" down
Index: rc.fritzdsl
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.fritzdsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rc.fritzdsl 20 Sep 2004 13:42:35 -0000 1.4
--- rc.fritzdsl 29 Mar 2005 18:45:35 -0000 1.5
***************
*** 1,15 ****
#!/bin/sh
- eval $(/usr/local/bin/readhash CONFIG_ROOT/ppp/settings)
-
# Debugging. Comment it out to stop logging
DEBUG="yes"
msg() {
if [ "z$DEBUG" != "z" ] ; then
! /usr/bin/logger red "FRITZDSL: $*"
fi
/bin/echo "$*"
}
# See how we were called.
case "$1" in
--- 1,36 ----
#!/bin/sh
# Debugging. Comment it out to stop logging
DEBUG="yes"
msg() {
if [ "z$DEBUG" != "z" ] ; then
! /usr/bin/logger -t red "FRITZDSL: $*"
fi
/bin/echo "$*"
}
+ if [ -e /var/run/need-depmod-`uname -r` ]; then
+ echo "Update modules dependencies, may take time..."
+ /sbin/depmod -a
+ /bin/rm -f /var/run/need-depmod-`uname -r`
+ fi
+
+ # ID borrowed from Gentoo ebuild,
+ # should work with 'Card DSL','Card DSL v2.0', 'Card DSL SL', 'Card DSL USB','Card \
DSL SL USB' + # pcmcia card not compiled
+ if ( /bin/grep "1244:2700" -q /proc/pci ); then
+ FCDSLMODEM='sl'
+ elif ( /bin/grep "1244:2900" -q /proc/pci ); then
+ FCDSLMODEM='2'
+ elif ( /bin/grep "1131:5402" -q /proc/pci ); then
+ FCDSLMODEM=''
+ elif ( /bin/grep "Vendor=057c ProdID=2300" -q /proc/bus/usb/devices ); then
+ FCDSLMODEM='usb'
+ elif ( /bin/grep "Vendor=057c ProdID=3500" -q /proc/bus/usb/devices ); then
+ FCDSLMODEM='slusb'
+ else
+ FCDSLMODEM='none'
+ fi
+
# See how we were called.
case "$1" in
***************
*** 18,36 ****
exit 0;
fi
! if [ -f CONFIG_ROOT/fritzdsl/fcdsl.o ]; then
! /sbin/insmod CONFIG_ROOT/fritzdsl/fcdsl.o
! /usr/sbin/capiinit start
! else
msg "Driver not uploaded"
exit 1
fi
;;
stop)
! /usr/sbin/capiinit stop
! /sbin/modprobe -r fcdsl 2>/dev/null
;;
*)
! /bin/echo "Usage: $0 {start|stop}"
exit 1
;;
--- 39,71 ----
exit 0;
fi
+ if [ "$FCDSLMODEM" = 'none' ]; then
+ msg "No supported modem found"
+ exit 1
+ fi
! if [ ! -f "/lib/modules/`/bin/uname -r`/misc/fcdsl$FCDSLMODEM.o.gz" ]; then
msg "Driver not uploaded"
exit 1
+ else
+ # should use drdsl and drdsl.ini for parameters autoconfiguration or use \
pppsetup.cgi? + /usr/sbin/capiinit -c "/etc/fcdsl/fcdsl$FCDSLMODEM.conf" start
fi
;;
stop)
! msg "stop"
! ;;
! cleanup)
! msg "driver cleanup"
! if [ "$FCDSLMODEM" = 'none' ]; then
! FCDSLMODEM=''
! fi
! /sbin/modprobe -r fcdslusb fcdslslusb
! /usr/sbin/capiinit -c "/etc/fcdsl/fcdsl$FCDSLMODEM.conf" stop
! if [ "$FCDSLMODEM" = 'slusb' -o "$FCDSLMODEM" = 'usb' ]; then
! /usr/local/bin/resetusb
! fi
;;
*)
! /bin/echo "Usage: $0 {start|stop|cleanup}"
exit 1
;;
Index: rc.conexantpciadsl
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.conexantpciadsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rc.conexantpciadsl 30 Sep 2004 07:49:05 -0000 1.4
--- rc.conexantpciadsl 29 Mar 2005 18:45:35 -0000 1.5
***************
*** 4,9 ****
#
- eval $(/usr/local/bin/readhash CONFIG_ROOT/ppp/settings)
-
# Debugging. Comment it out to stop logging
DEBUG="yes"
--- 4,7 ----
***************
*** 34,59 ****
msg "starting"
# if the driver is not already loaded then
! if ( ! /sbin/lsmod | /bin/grep -q CnxADSL ); then
! /sbin/modprobe atm
if ( ! /bin/cat /proc/pci | /bin/grep -q '14f1' ); then
msg "no conexant modem"
exit 1
fi
if ( /bin/cat /proc/pci | /bin/grep -q '14f1:1611' ); then
# Tigris model
- /sbin/insmod CnxADSL \
- CnxtDslVendorId=0x14F1 \
- CnxtDslArmDeviceId=0x1610 \
- CnxtDslAdslDeviceId=0x1611 \
- CnxtDslPhysicalDriverType=1
/bin/ln -f -s /etc/Conexant/CnxTgF.hex CONFIG_ROOT/cnx_pci/firmware.hex
else
if ( /bin/cat /proc/pci | /bin/grep -q '14f1:1622' ); then
# Yukon model
- /sbin/insmod CnxADSL \
- CnxtDslVendorId=0x14F1 \
- CnxtDslArmDeviceId=0x1620 \
- CnxtDslAdslDeviceId=0x1622 \
- CnxtDslPhysicalDriverType=2
/bin/ln -f -s /etc/Conexant/CnxYkF.hex CONFIG_ROOT/cnx_pci/firmware.hex
else
--- 32,53 ----
msg "starting"
# if the driver is not already loaded then
! if ( /sbin/lsmod | /bin/grep -q CnxADSL ); then
! msg "already loaded"
! else
if ( ! /bin/cat /proc/pci | /bin/grep -q '14f1' ); then
msg "no conexant modem"
exit 1
fi
+ /sbin/modprobe CnxADSL
+ RETVAL=$?
+ if [ $RETVAL -ne 0 ] ; then
+ msg "error when loading, card present?"
+ fi
if ( /bin/cat /proc/pci | /bin/grep -q '14f1:1611' ); then
# Tigris model
/bin/ln -f -s /etc/Conexant/CnxTgF.hex CONFIG_ROOT/cnx_pci/firmware.hex
else
if ( /bin/cat /proc/pci | /bin/grep -q '14f1:1622' ); then
# Yukon model
/bin/ln -f -s /etc/Conexant/CnxYkF.hex CONFIG_ROOT/cnx_pci/firmware.hex
else
***************
*** 66,79 ****
/bin/ln -f -s /etc/Conexant/cnxadsl.conf CONFIG_ROOT/cnx_pci/cnxadsl.conf
/etc/Conexant/cnxadslload CONFIG_ROOT/cnx_pci
- RETVAL=$?
- if [ $RETVAL -eq 0 ] ; then
- # Create the tty device
- number=`/usr/bin/awk '/ttyCX/ { print $1 }' /proc/devices`
- number=${number:?"Could not find device"}
- /bin/rm -f /dev/ttyCX
- /bin/mknod --mode=660 /dev/ttyCX c $number 0
- else
- msg "already loaded"
- fi
fi
wait_for_showtime
--- 60,63 ----
***************
*** 85,94 ****
cleanup)
msg "cleanup"
! # /bin/killall cnxadslload 2>/dev/null
! # this trigger a "stack smashing attack in function kill_all" so commented until a \
fix is made
! /sbin/rmmod CnxADSL 2>/dev/null
! /sbin/modprobe -r atm
! # get rid of the tty device
! /bin/rm -f /dev/ttyCX
;;
*)
--- 69,74 ----
cleanup)
msg "cleanup"
! /bin/killall cnxadslload 2>/dev/null
! /sbin/modprobe -r CnxADSL
;;
*)
Index: rc.bewanadsl
===================================================================
RCS file: /cvsroot/ipcop/ipcop/src/rc.d/rc.bewanadsl,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rc.bewanadsl 30 Sep 2004 07:49:05 -0000 1.8
--- rc.bewanadsl 29 Mar 2005 18:45:35 -0000 1.9
***************
*** 75,77 ****
esac
! exit 0
\ No newline at end of file
--- 75,77 ----
esac
! exit 0
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
IPCop-cvs mailing list
IPCop-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic