[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-svn
Subject: [Ipcop-svn] SF.net SVN: ipcop:[1907]
From: owes () users ! sourceforge ! net
Date: 2008-09-16 19:55:46
Message-ID: E1KfgeI-0007q5-Ty () 3kljzd1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 1907
http://ipcop.svn.sourceforge.net/ipcop/?rev=1907&view=rev
Author: owes
Date: 2008-09-16 19:55:46 +0000 (Tue, 16 Sep 2008)
Log Message:
-----------
apply CodingStyle
Modified Paths:
--------------
ipcop/trunk/src/rc.d/rc.pulsardsl
Modified: ipcop/trunk/src/rc.d/rc.pulsardsl
===================================================================
--- ipcop/trunk/src/rc.d/rc.pulsardsl 2008-09-16 19:55:36 UTC (rev 1906)
+++ ipcop/trunk/src/rc.d/rc.pulsardsl 2008-09-16 19:55:46 UTC (rev 1907)
@@ -3,67 +3,67 @@
# $Id$
#
-eval $(/usr/local/bin/readhash CONFIG_ROOT/ppp/settings)
+eval $(/usr/local/bin/readhash /var/ipcop/ppp/settings)
PULSARFS='/proc/driver/pulsar'
# Debugging. Comment it out to stop logging
DEBUG="yes"
msg() {
- if [ "z$DEBUG" != "z" ] ; then
- /usr/bin/logger -t red "Pulsar DSL: $*"
- fi
- echo "$*"
+ if [ "z$DEBUG" != "z" ] ; then
+ /usr/bin/logger -t red "Pulsar DSL: $*"
+ fi
+ echo "$*"
}
function wait_for_sync()
{
- if [ ! -f "$PULSARFS/pulsar0" ]; then
- msg "No device 0 found"
- exit 1
- fi
- msg "Waiting for ADSL sync during $1 s"
- FLREADY=0
- TIMES=1
- while [ $TIMES -le $1 ]; do
- /bin/sleep 3
- (( TIMES += 3 ))
- if [ 0`/bin/cat $PULSARFS/pulsar0 | /usr/bin/cut -d ' ' -f2` -eq 0 ]; then
- msg "sync done"
- FLREADY=1
- break
- fi
- done
- if [ 0"$FLREADY" -eq 0 ]; then
- msg "Failure to sync after $1 s"
- exit 1
- fi
+ if [ ! -f "$PULSARFS/pulsar0" ]; then
+ msg "No device 0 found"
+ exit 1
+ fi
+ msg "Waiting for ADSL sync during $1 s"
+ FLREADY=0
+ TIMES=1
+ while [ $TIMES -le $1 ]; do
+ /bin/sleep 3
+ (( TIMES += 3 ))
+ if [ 0`/bin/cat $PULSARFS/pulsar0 | /usr/bin/cut -d ' ' -f2` -eq 0 ]; then
+ msg "sync done"
+ FLREADY=1
+ break
+ fi
+ done
+ if [ 0"$FLREADY" -eq 0 ]; then
+ msg "Failure to sync after $1 s"
+ exit 1
+ fi
}
# See how we were called.
case "$1" in
- start)
- if ( ! /bin/lsmod | /bin/grep -q pulsar ); then
- /sbin/modprobe pulsar
- if [ $? -ne 0 ]; then
- msg "loading failed"
- exit 2
- fi
- fi
- wait_for_sync 90
- exit 0
- ;;
+start)
+ if ( ! /bin/lsmod | /bin/grep -q pulsar ); then
+ /sbin/modprobe pulsar
+ if [ $? -ne 0 ]; then
+ msg "loading failed"
+ exit 2
+ fi
+ fi
+ wait_for_sync 90
+ exit 0
+ ;;
stop)
- msg "stop"
- ;;
+ msg "stop"
+ ;;
cleanup)
- msg "driver cleanup"
- /sbin/modprobe -r pulsar
- ;;
- *)
- echo "Usage: $0 {start|stop|cleanup}"
- exit 1
- ;;
+ msg "driver cleanup"
+ /sbin/modprobe -r pulsar
+ ;;
+*)
+ echo "Usage: $0 {start|stop|cleanup}"
+ exit 1
+ ;;
esac
exit 0
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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