[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-svn
Subject: [Ipcop-svn] SF.net SVN: ipcop:[3504] ipcop/trunk/config/ppp
From: owes () users ! sourceforge ! net
Date: 2009-08-28 8:12:07
Message-ID: E1MgwZ5-000685-26 () 3kljzd1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 3504
http://ipcop.svn.sourceforge.net/ipcop/?rev=3504&view=rev
Author: owes
Date: 2009-08-28 08:12:06 +0000 (Fri, 28 Aug 2009)
Log Message:
-----------
Apply coding style
Modified Paths:
--------------
ipcop/trunk/config/ppp/ip-down
ipcop/trunk/config/ppp/ip-up
Modified: ipcop/trunk/config/ppp/ip-down
===================================================================
--- ipcop/trunk/config/ppp/ip-down 2009-08-28 07:22:10 UTC (rev 3503)
+++ ipcop/trunk/config/ppp/ip-down 2009-08-28 08:12:06 UTC (rev 3504)
@@ -21,29 +21,29 @@
# read vars back from file.
&General::readhash('/var/ipcop/main/settings', \%mainsettings);
-unlink "${General::swroot}/red/active";
-system "/etc/rc.d/rc.updatered";
+unlink('/var/ipcop/red/active');
+system('/etc/rc.d/rc.updatered');
# Beep when ppp goes up or down if permittted.
system('/usr/bin/beep','-l 75', '-f 880', '-n', '-l 120', '-f 440') if \
($mainsettings{'PPPUPDOWNBEEP'} eq 'on' );
-if ( -e "${General::swroot}/red/keepconnected") {
+if ( -e '/var/ipcop/red/keepconnected') {
- # We have to stop the ipppd (TYPE is ISDN) it stays even on disconnect (from ISP),
- # and rc.connectioncheck will fail to reconnect as it waits for [p]ppd to go away.
- my %pppsettings;
- &General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
+ # We have to stop the ipppd (TYPE is ISDN) it stays even on disconnect (from \
ISP), + # and rc.connectioncheck will fail to reconnect as it waits for [p]ppd to \
go away. + my %pppsettings;
+ &General::readhash('/var/ipcop/ppp/settings', \%pppsettings);
- if ($pppsettings{'TYPE'} eq 'isdn')
- {
- system ("/usr/bin/touch ${General::swroot}/red/redial");
- system ('/etc/rc.d/rc.red stop');
- }
+ if ($pppsettings{'TYPE'} eq 'isdn') {
+ system ('/usr/bin/touch var/ipcop/red/redial');
+ system ('/etc/rc.d/rc.red stop');
+ }
- if ( system ('/bin/ps ax | /bin/grep -q "[r]c.connectioncheck reconnect"') ) {
- system ('/etc/rc.d/rc.connectioncheck reconnect &');
- } else {
- &General::log ('rc.connectioncheck reconnect already running');
- }
+ if ( system ('/bin/ps ax | /bin/grep -q "[r]c.connectioncheck reconnect"') ) {
+ system ('/etc/rc.d/rc.connectioncheck reconnect &');
+ }
+ else {
+ &General::log ('rc.connectioncheck reconnect already running');
+ }
}
Modified: ipcop/trunk/config/ppp/ip-up
===================================================================
--- ipcop/trunk/config/ppp/ip-up 2009-08-28 07:22:10 UTC (rev 3503)
+++ ipcop/trunk/config/ppp/ip-up 2009-08-28 08:12:06 UTC (rev 3504)
@@ -23,29 +23,28 @@
&General::readhash('/var/ipcop/ppp/settings', \%pppsettings);
if ( ( $pppsettings{'TYPE'} eq 'isdn') &&
- ( $pppsettings{'COMPORT'} eq 'isdn2') &&
- ( $pppsettings{'USEIBOD'} eq 'off') ) {
- system('/usr/sbin/isdnctrl', 'dial', 'ippp1');
+ ( $pppsettings{'COMPORT'} eq 'isdn2') &&
+ ( $pppsettings{'USEIBOD'} eq 'off') ) {
+ system('/usr/sbin/isdnctrl', 'dial', 'ippp1');
}
my $dns = $pppsettings{'DNS'};
my $primarydns = $pppsettings{'DNS1'};
my $secondarydns = $pppsettings{'DNS2'};
if ($dns eq 'Automatic') {
- if (!($pppsettings{'TYPE'} =~ /^isdn/))
- {
- if (open(FILE, ">/var/ipcop/red/dns1")) { print FILE $ENV{'DNS1'}; close FILE; }
- if (open(FILE, ">/var/ipcop/red/dns2")) { print FILE $ENV{'DNS2'}; close FILE; }
- }
- else
- {
- if (open(FILE, ">/var/ipcop/red/dns1")) { print FILE $ENV{'MS_DNS1'}; close FILE; \
}
- if (open(FILE, ">/var/ipcop/red/dns2")) { print FILE $ENV{'MS_DNS2'}; close FILE; \
}
- }
-} else {
- if (open(FILE, ">/var/ipcop/red/dns1")) { print FILE $pppsettings{'DNS1'}; close \
FILE; }
- if (open(FILE, ">/var/ipcop/red/dns2")) { print FILE $pppsettings{'DNS2'}; close \
FILE; } + if (!($pppsettings{'TYPE'} =~ /^isdn/)) {
+ if (open(FILE, ">/var/ipcop/red/dns1")) { print FILE $ENV{'DNS1'}; close \
FILE; } + if (open(FILE, ">/var/ipcop/red/dns2")) { print FILE $ENV{'DNS2'}; \
close FILE; } + }
+ else {
+ if (open(FILE, ">/var/ipcop/red/dns1")) { print FILE $ENV{'MS_DNS1'}; close \
FILE; } + if (open(FILE, ">/var/ipcop/red/dns2")) { print FILE \
$ENV{'MS_DNS2'}; close FILE; } + }
}
+else {
+ if (open(FILE, ">/var/ipcop/red/dns1")) { print FILE $pppsettings{'DNS1'}; close \
FILE; } + if (open(FILE, ">/var/ipcop/red/dns2")) { print FILE \
$pppsettings{'DNS2'}; close FILE; } +}
if (open(FILE, ">/var/ipcop/red/iface")) { print FILE $ARGV[0]; close (FILE); }
if (open(FILE, ">/var/ipcop/red/local-ipaddress")) { print FILE $ARGV[3]; close \
(FILE); }
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic