|
From: Serge L. <sma...@us...> - 2009-05-27 20:46:17
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23074/scripts/scripts Added Files: ippoold Log Message: - updated cyrus-sasl to 2.1.23 - updated freeradius-server to 2.1.6 - added ippool (L2TP VPN component) - updated ntp to 4.2.4p7 - updated quagga to 0.99.12 --- NEW FILE: ippoold --- #! /bin/bash # # # description: Ippool is a simple IP address pool manager with an RPC interface. ### BEGIN INIT INFO # Provides: ippool # Required-Start: $network $syslog $named $portmap # Required-Stop: $network $syslog $named # Default-Start: 3 5 # Default-Stop: 0 1 6 # Description: Start/Stop IP address pool manager ### END INIT INFO # settings source /etc/sysconfig/config source /etc/init.d/functions source /etc/sysconfig/ippoold # parameters NAME="ippool" CONFIGNAME=L2TPD DAEMON=/usr/sbin/ippoold PARAMETER= # See how we were called. eval START=\$START_$CONFIGNAME # Determine the base and follow a runlevel link name. base=${0##*/} link=${base#*[SK][0-9][0-9]} # Force execution if not called by a runlevel directory. test $link = $base && START=yes test "$START" = "yes" || exit 0 if [ ! -e $DAEMON ]; then echo echo "$DAEMON not found. Did you install the package?" exit 1 fi # See how we were called. start() { echo -n "Starting IP address pool manager: " if [ -e /var/lock/subsys/ippoold ]; then if [ -e /var/run/ippoold.pid ] && [ -e /proc/`cat /var/run/ippoold.pid` ]; then echo -n $"cannot start ippoold: ippoold is already running."; failure $"cannot start ippoold: ippoold already running."; echo return 1 fi fi loadproc ippoold $IPPOOLDARGS RETVAL=$? if [ $RETVAL -eq 0 ]; then touch /var/lock/subsys/ippoold if [ -n "$IPPOOLD_CONFIG_FILE" ]; then sleep 1 echo $"Restoring saved ippoold configuration..." /usr/bin/ippoolconfig config restore file=$IPPOOLD_CONFIG_FILE RETVAL=$? fi fi return $RETVAL } stop() { echo -n $"Stopping $prog: " if [ ! -e /var/lock/subsys/ippoold ]; then echo -n $"cannot stop ippoold: ippoold is not running." failure $"cannot stop ippoold: ippoold is not running." echo return 1; fi killproc ippoold rm -f /var/run/ippoold.pid rm -f /var/lock/subsys/ippoold return 0 } restart() { stop start } reload() { echo -n $"Reloading ippool daemon configuration: " stop start RETVAL=$? echo return $RETVAL } case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; condrestart) [ -f /var/lock/subsys/ippoold ] && restart || : ;; *) echo $"Usage: $0 {start|stop|reload|restart|condrestart}" exit 1 esac |