[leaf-commits] src/bering-uclibc4/source/pppoesrv pppoesrv.init, 1.4, 1.5

Andrew <[email protected]> Fri, 12 Nov 2010 10:41:17 +0000
Newsgroups gmane.linux.leaf.cvs
Message-ID <[email protected]>
Update of /cvsroot/leaf/src/bering-uclibc4/source/pppoesrv
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20867

Modified Files:
	pppoesrv.init 
Log Message:
added checking for running pppoe server processes before startup


Index: pppoesrv.init
===================================================================
RCS file: /cvsroot/leaf/src/bering-uclibc4/source/pppoesrv/pppoesrv.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pppoesrv.init	12 Nov 2010 10:32:33 -0000	1.4
--- pppoesrv.init	12 Nov 2010 10:41:15 -0000	1.5
***************
*** 36,72 ****
    start)
      echo -n "Starting PPPoE server daemon... "
!     if [ -n "$IFACES" ]; then
! 	INST=0
! 	for i in $IFACES; do
! 	    IARGS="$IARGS -I $i"
! 	    if [ `echo $IARGS | wc -w` -ge  $MAX_IARGS ]; then
! 	        if /usr/sbin/pppoe-server $ARGS $IARGS
! 	        then
! 		    echo -n "done #$INST... "
  		else
! 		    echo -n "failed #$INST... "
  		fi
  		IARGS=""
- 		INST=$(($INST + 1))
- 	    fi
- 	done
- 	if [ `echo $IARGS | wc -w` -gt  0 ]; then
- 	    if /usr/sbin/pppoe-server $ARGS $IARGS
- 	    then
- 		echo "done #$INST."
  	    else
! 		echo "failed #$INST."
  	    fi
- 	    IARGS=""
  	else
! 	    echo ""
! 	fi
!     else
!         if start-stop-daemon --start --quiet --exec /usr/sbin/pppoe-server -- $ARGS
! 	then
  		echo done.
!         else
  		echo failed.
  	fi
      fi
      ;;
--- 36,76 ----
    start)
      echo -n "Starting PPPoE server daemon... "
!     if start-stop-daemon --start --quiet --test --exec /usr/sbin/pppoe-server; then
!         if [ -n "$IFACES" ]; then
! 	    INST=0
! 	    for i in $IFACES; do
! 		IARGS="$IARGS -I $i"
! 		if [ `echo $IARGS | wc -w` -ge  $MAX_IARGS ]; then
! 		    if /usr/sbin/pppoe-server $ARGS $IARGS
! 		    then
! 			echo -n "done #$INST... "
! 		    else
! 			echo -n "failed #$INST... "
! 		    fi
! 		    IARGS=""
! 		    INST=$(($INST + 1))
! 		fi
! 	    done
! 	    if [ `echo $IARGS | wc -w` -gt  0 ]; then
! 		if /usr/sbin/pppoe-server $ARGS $IARGS
! 		then
! 		    echo "done #$INST."
  		else
! 		    echo "failed #$INST."
  		fi
  		IARGS=""
  	    else
! 		echo ""
  	    fi
  	else
! 	    if start-stop-daemon --start --quiet --exec /usr/sbin/pppoe-server -- $ARGS
! 	    then
  		echo done.
! 	    else
  		echo failed.
+ 	    fi
  	fi
+     else
+ 	echo "failed (already running?)."
      fi
      ;;


------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev