Revision: 7113
          http://sourceforge.net/p/ipcop/svn/7113
Author:   dotzball
Date:     2013-10-13 11:42:49 +0000 (Sun, 13 Oct 2013)
Log Message:
-----------
Fix scheduler disconnect/reconnect for non-PPP configurations.

Modified Paths:
--------------
    ipcop/trunk/src/scripts/scheduler.pl

Modified: ipcop/trunk/src/scripts/scheduler.pl
===================================================================
--- ipcop/trunk/src/scripts/scheduler.pl        2013-10-10 01:58:50 UTC (rev 
7112)
+++ ipcop/trunk/src/scripts/scheduler.pl        2013-10-13 11:42:49 UTC (rev 
7113)
@@ -94,10 +94,14 @@
     &General::log("Scheduler hangup");
     &General::log('red', 'Scheduler hangup');
 
-    return unless (-e '/var/ipcop/red/active');
-    return unless (-e '/var/run/ppp-ipcop.pid');
-    my $ppppid = `cat /var/run/ppp-ipcop.pid | grep -v ppp`;
-    chomp($ppppid);
+    my $existPPP = -e '/var/run/ppp-ipcop.pid';
+    return unless (-e '/var/ipcop/red/active' || $existPPP);
+    
+    my $ppppid = '-';
+    if($existPPP) {
+        $ppppid = `cat /var/run/ppp-ipcop.pid | grep -v ppp`;
+        chomp($ppppid);
+    }
 
     unless (system('/etc/rc.d/rc.red', 'stop') == 0) {
         &General::log("Scheduler hangup failed: $?");
@@ -106,7 +110,7 @@
 
     # now wait for red/active triggerfile and ppp daemon to disappear
     sleep 1;
-    while (-e '/var/ipcop/red/active' || -d "/proc/$ppppid") {
+    while (-e '/var/ipcop/red/active' || ($existPPP && -d "/proc/$ppppid")) {
         sleep 1;
     }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to