[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-svn
Subject: [Ipcop-svn] SF.net SVN: ipcop:[6003] ipcop/trunk/src/rc.d
From: owes () users ! sourceforge ! net
Date: 2011-10-29 13:18:58
Message-ID: E1RK8oM-0000ZI-KH () sfp-svn-5 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 6003
http://ipcop.svn.sourceforge.net/ipcop/?rev=6003&view=rev
Author: owes
Date: 2011-10-29 13:18:58 +0000 (Sat, 29 Oct 2011)
Log Message:
-----------
Move cleaning of /red from rc.net into rc.red. Add connecting and disconnecting flag \
files.
Modified Paths:
--------------
ipcop/trunk/src/rc.d/rc.net
ipcop/trunk/src/rc.d/rc.red
ipcop/trunk/src/rc.d/rc.updatered
Modified: ipcop/trunk/src/rc.d/rc.net
===================================================================
--- ipcop/trunk/src/rc.d/rc.net 2011-10-28 14:55:42 UTC (rev 6002)
+++ ipcop/trunk/src/rc.d/rc.net 2011-10-29 13:18:58 UTC (rev 6003)
@@ -13,10 +13,9 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with IPCop; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# along with IPCop. If not, see <http://www.gnu.org/licenses/>.
#
-# (c) 2008-2010, the IPCop team
+# (c) 2008-2011, the IPCop team
#
# $Id$
#
@@ -128,15 +127,7 @@
system("/sbin/modprobe nf_nat_proto_gre");
&General::testok($columns);
- # Remove possible leftover files
- unlink "/var/ipcop/red/active";
- unlink "/var/ipcop/red/device";
- unlink "/var/ipcop/red/dial-on-demand";
- unlink "/var/ipcop/red/dns1";
- unlink "/var/ipcop/red/dns2";
- unlink "/var/ipcop/red/eciadsl-synch-done";
- unlink "/var/ipcop/red/local-ipaddress";
- unlink "/var/ipcop/red/remote-ipaddress";
+ system("/etc/rc.d/rc.red clear");
# Create an empty resolv.conf for dnsmasq, will be filled with proper data later \
by rc.updatered system ('echo > /var/ipcop/red/resolv.conf');
Modified: ipcop/trunk/src/rc.d/rc.red
===================================================================
--- ipcop/trunk/src/rc.d/rc.red 2011-10-28 14:55:42 UTC (rev 6002)
+++ ipcop/trunk/src/rc.d/rc.red 2011-10-29 13:18:58 UTC (rev 6003)
@@ -57,6 +57,7 @@
if (system(@dhcpcommand)) {
&General::log('red', 'dhcp client fail');
+ unlink('/var/ipcop/red/connecting');
exit 1;
}
else {
@@ -107,6 +108,8 @@
exit 1;
}
+ system('/usr/bin/touch /var/ipcop/red/connecting');
+ unlink '/var/ipcop/red/disconnecting';
if (
(
(($netsettings{'RED_1_TYPE'} =~ /^(PPPOE|PPTP)$/) && \
($netsettings{'RED_COUNT'} > 0)) @@ -182,6 +185,7 @@
}
else {
&General::log("ERROR: Can't start RED when RED device not set!");
+ unlink('/var/ipcop/red/connecting');
exit 1;
}
}
@@ -245,8 +249,10 @@
$iface = &General::getredinterface();
my $device = &General::getinterfacefromfile("/var/ipcop/red/device");
+ system('/usr/bin/touch /var/ipcop/red/disconnecting');
unlink "/var/ipcop/red/dial-on-demand";
unlink "/var/ipcop/red/active";
+ unlink "/var/ipcop/red/connecting";
unlink "/var/ipcop/red/local-ipaddress";
unlink "/var/ipcop/red/remote-ipaddress";
unlink "/var/ipcop/red/dns1";
@@ -337,6 +343,18 @@
elsif ($ARGV[0] eq 'clear') {
&doupdatesettings();
&docleanup();
+
+ # Remove possible leftover files
+ unlink '/var/ipcop/red/active';
+ unlink '/var/ipcop/red/connecting';
+ unlink '/var/ipcop/red/device';
+ unlink '/var/ipcop/red/disconnecting';
+ unlink '/var/ipcop/red/dial-on-demand';
+ unlink '/var/ipcop/red/dns1';
+ unlink '/var/ipcop/red/dns2';
+ unlink '/var/ipcop/red/eciadsl-synch-done';
+ unlink '/var/ipcop/red/local-ipaddress';
+ unlink '/var/ipcop/red/remote-ipaddress';
}
else {
&General::log("ERROR: rc.red bad argument (start|stop|clear)");
Modified: ipcop/trunk/src/rc.d/rc.updatered
===================================================================
--- ipcop/trunk/src/rc.d/rc.updatered 2011-10-28 14:55:42 UTC (rev 6002)
+++ ipcop/trunk/src/rc.d/rc.updatered 2011-10-29 13:18:58 UTC (rev 6003)
@@ -58,6 +58,10 @@
{
system("/etc/rc.d/rc.event red $updown");
&General::log('red', "rc.updatered (pid $$) end") if ($pppsettings{'DEBUG'} eq \
'on'); +
+ unlink('/var/ipcop/red/connecting');
+ unlink('/var/ipcop/red/disconnecting');
+
exit 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World™ now supports Android™ Apps
for the BlackBerry® PlayBook™. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
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