From: Gilles E. <ges...@us...> - 2003-08-31 22:21:04
|
Update of /cvsroot/ipcop/ipcop/src/rc.d In directory sc8-pr-cvs1:/tmp/cvs-serv6821/ipcop/src/rc.d Modified Files: Tag: IPCOP_v1 rc.red Log Message: Change to other DHCP call / Suppress DHCP for ATM modems Index: rc.red =================================================================== RCS file: /cvsroot/ipcop/ipcop/src/rc.d/Attic/rc.red,v retrieving revision 1.1.2.38 retrieving revision 1.1.2.39 diff -C2 -d -r1.1.2.38 -r1.1.2.39 *** rc.red 30 Aug 2003 21:21:29 -0000 1.1.2.38 --- rc.red 31 Aug 2003 22:21:00 -0000 1.1.2.39 *************** *** 574,578 **** system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); } elsif ($pppsettings {'METHOD'} eq 'DHCP') { ! unlink </etc/dhcpc/*.info>; my @dhcpcommand = ('/sbin/dhcpcd'); if ($pppsettings{'DHCP_HOSTNAME'} ne '') { --- 574,578 ---- system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); } elsif ($pppsettings {'METHOD'} eq 'DHCP') { ! foreach (</etc/dhcpc/*.info>) { unlink $1 if ( $_ =~ /^([\/\w.-]+)$/ ); } my @dhcpcommand = ('/sbin/dhcpcd'); if ($pppsettings{'DHCP_HOSTNAME'} ne '') { *************** *** 653,657 **** system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); } elsif ($pppsettings {'METHOD'} eq 'DHCP') { ! unlink </etc/dhcpc/*.info>; my @dhcpcommand = ('/sbin/dhcpcd'); if ($pppsettings{'DHCP_HOSTNAME'} ne '') { --- 653,657 ---- system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); } elsif ($pppsettings {'METHOD'} eq 'DHCP') { ! foreach (</etc/dhcpc/*.info>) { unlink $1 if ( $_ =~ /^([\/\w.-]+)$/ ); } my @dhcpcommand = ('/sbin/dhcpcd'); if ($pppsettings{'DHCP_HOSTNAME'} ne '') { *************** *** 725,730 **** open(FILE, "/proc/modules") or die 'Unable to open /proc/modules.'; ! my @modules = <FILE>; ! close(FILE); if (! grep { /fcdsl/ } @modules) { &log ("ERROR: FRITZ!DSL failed to start"); --- 725,730 ---- open(FILE, "/proc/modules") or die 'Unable to open /proc/modules.'; ! my @modules = <FILE>; ! close(FILE); if (! grep { /fcdsl/ } @modules) { &log ("ERROR: FRITZ!DSL failed to start"); *************** *** 803,807 **** system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); } elsif ($pppsettings {'METHOD'} eq 'DHCP') { ! unlink </etc/dhcpc/*.info>; my @dhcpcommand = ('/sbin/dhcpcd'); if ($pppsettings{'DHCP_HOSTNAME'} ne '') { --- 803,807 ---- system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); } elsif ($pppsettings {'METHOD'} eq 'DHCP') { ! foreach (</etc/dhcpc/*.info>) { unlink $1 if ( $_ =~ /^([\/\w.-]+)$/ ); } my @dhcpcommand = ('/sbin/dhcpcd'); if ($pppsettings{'DHCP_HOSTNAME'} ne '') { *************** *** 970,974 **** system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); } elsif ($pppsettings {'METHOD'} eq 'DHCP') { ! unlink </etc/dhcpc/*.info>; my @dhcpcommand = ('/sbin/dhcpcd'); if ($pppsettings{'DHCP_HOSTNAME'} ne '') { --- 970,974 ---- system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); } elsif ($pppsettings {'METHOD'} eq 'DHCP') { ! foreach (</etc/dhcpc/*.info>) { unlink $1 if ( $_ =~ /^([\/\w.-]+)$/ ); } my @dhcpcommand = ('/sbin/dhcpcd'); if ($pppsettings{'DHCP_HOSTNAME'} ne '') { *************** *** 1009,1027 **** system ('/sbin/atmarp', '-s', $pppsettings{'GATEWAY'},"0.".$pppsettings{'VPI'}.".".$pppsettings{'VCI'},$ENCAP); system ("/sbin/route","add","default","gw",$pppsettings{'GATEWAY'}); - } elsif ($pppsettings {'METHOD'} eq 'DHCP') { - # something need to be done if GATEWAY is not mandatory but what? - system ('/sbin/atmarp', '-s', $pppsettings{'GATEWAY'},"0.".$pppsettings{'VPI'}.".".$pppsettings{'VCI'},$ENCAP); - unlink </etc/dhcpc/*.info>; - my @dhcpcommand = ('/sbin/dhcpcd'); - if ($pppsettings{'DHCP_HOSTNAME'} ne '') { - push(@dhcpcommand, ('-h', $pppsettings{'DHCP_HOSTNAME'})); - } - push(@dhcpcommand, ('-R',$iface)); - if (system (@dhcpcommand)) { - &log('dhcpcd fail'); - exit 1; - } else { - &log('dhcpcd success'); - } } } --- 1009,1012 ---- |