[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipcop-svn
Subject:    [Ipcop-svn] SF.net SVN: ipcop:[3603] ipcop/trunk/src/rc.d
From:       owes () users ! sourceforge ! net
Date:       2009-09-25 20:05:39
Message-ID: E1MrH2x-0003ZT-6d () dn4whf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 3603
          http://ipcop.svn.sourceforge.net/ipcop/?rev=3603&view=rev
Author:   owes
Date:     2009-09-25 20:05:38 +0000 (Fri, 25 Sep 2009)

Log Message:
-----------
Start RED at the end from rc.sysinit.
TODO: find a way to use ntpdate for quicker ntp synchronisation after first RED \
connection.

Modified Paths:
--------------
    ipcop/trunk/src/rc.d/rc.net
    ipcop/trunk/src/rc.d/rc.sysinit

Modified: ipcop/trunk/src/rc.d/rc.net
===================================================================
--- ipcop/trunk/src/rc.d/rc.net	2009-09-25 20:00:01 UTC (rev 3602)
+++ ipcop/trunk/src/rc.d/rc.net	2009-09-25 20:05:38 UTC (rev 3603)
@@ -70,13 +70,19 @@
 }
 elsif (($ARGV[0] eq 'start') || ($ARGV[0] eq '--start')) {
     &net_start(\%netsettings);
+    &net_startred(\%netsettings);
 }
+elsif (($ARGV[0] eq 'startred') || ($ARGV[0] eq '--startred')) {
+    $columns = &General::getcolumns() - 10;
+    &net_startred(\%netsettings);
+}
 elsif (($ARGV[0] eq 'stop') || ($ARGV[0] eq '--stop')) {
     &net_stop(\%netsettings);
 }
 elsif (($ARGV[0] eq 'restart') || ($ARGV[0] eq '--restart')) {
     &net_stop(\%netsettings);
     &net_start(\%netsettings);
+    &net_startred(\%netsettings);
 }
 elsif (($ARGV[0] eq 'load') || ($ARGV[0] eq '--load')) {
     &modules_load(\%netsettings);
@@ -176,7 +182,16 @@
     }
 
     system("/etc/rc.d/rc.dnsmasq restart");
+}
 
+
+#
+# Start RED
+#
+sub net_startred
+{
+    my $settings = shift;
+
     if(($pppsettings{'AUTOCONNECT'} eq 'on') ||
        (($settings->{'RED_COUNT'} > 0) && (($settings->{'RED_1_TYPE'} eq 'STATIC') \
|| ($settings->{'RED_1_TYPE'} eq 'DHCP')))) {  print "Starting interface RED ... ";

Modified: ipcop/trunk/src/rc.d/rc.sysinit
===================================================================
--- ipcop/trunk/src/rc.d/rc.sysinit	2009-09-25 20:00:01 UTC (rev 3602)
+++ ipcop/trunk/src/rc.d/rc.sysinit	2009-09-25 20:05:38 UTC (rev 3603)
@@ -349,7 +349,7 @@
 test_ok
 
 echo -ne "Starting ntpd (if enabled) ... "
-/usr/local/bin/restartntpd --boot
+/usr/local/bin/restartntpd
 test_ok
 
 if [ -e /var/log/rrd/disk.rrd ]; then
@@ -391,3 +391,6 @@
 /etc/rc.d/rc.event system up
 
 /usr/bin/logger -t ipcop "IPCop started."
+
+# Start RED if 'Connect on IPCop restart' enabled
+/etc/rc.d/rc.net --startred


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

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
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