9
0
Fork 0

New ggsn Sys V init file and updated ggsn.conf

This commit is contained in:
jjako 2003-07-06 17:33:03 +00:00
parent e014978dfb
commit 7be9bd8055
2 changed files with 101 additions and 5 deletions

View File

@ -7,7 +7,7 @@
# TAG: fg
# Include this flag if process is to run in the foreground
#
fg
#fg
# TAG: debug
# Include this flag to include debug information.
@ -32,7 +32,7 @@ fg
# TAG: listen
# Specifies the local IP address to listen to
listen 10.0.0.240
#listen 10.0.0.240
# TAG: net
# IP network address of external packet data network
@ -52,15 +52,14 @@ listen 10.0.0.240
# TAG: dynip
# Dynamic IP address pool.
# Used for allocation of dynamic IP address when address is not given
# by HLR or radius server.
# by HLR.
# If this option is not given then the net option is used as a substitute.
#dynip 192.168.0.0/24
# TAG: statip
# Use of this tag is currently UNSUPPORTED
# Static IP address pool.
# Used for allocation of static IP address by means of either HLR or
# radius server.
# Used for allocation of static IP address by means of HLR.
#statip 192.168.1.0/24
# TAG: pcodns1

97
examples/ggsn.init Normal file
View File

@ -0,0 +1,97 @@
#!/bin/sh
#
# ggsn This shell script takes care of starting and stopping
# ggsn.
#
# chkconfig: - 65 35
# description: ggsn is a Gateway GPRS Support Node.
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
if [ -f /etc/sysconfig/ggsn ]; then
. /etc/sysconfig/ggsn
fi
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /usr/bin/ggsn ] || exit 0
[ -f /etc/ggsn.conf ] || exit 0
RETVAL=0
prog="ggsn"
start() {
# Start daemons.
echo -n $"Starting $prog: "
# Load tun module
/sbin/modprobe tun >/dev/null 2>&1
# Enable routing of packets: WARNING!!!
# Users should enable this explicitly
# echo 1 > /proc/sys/net/ipv4/ip_forward
# Check for runtime directory of nonvolatile data
if [ ! -d /var/run/ggsn ]; then
mkdir /var/run/ggsn
fi
# Check for GTP restart counter
if [ ! -d /var/run/ggsn/gsn_restart ]; then
echo 0 > /var/run/ggsn/gsn_restart
fi
daemon /usr/bin/ggsn
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ggsn
return $RETVAL
}
stop() {
# Stop daemons.
echo -n $"Shutting down $prog: "
killproc ggsn
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/ggsn /var/run/ggsn.pid
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/ggsn ] ; then
stop
start
RETVAL=$?
fi
;;
status)
status ggsn
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL