]> git.pld-linux.org Git - packages/gated.git/blame - gated.init
- dropped pre-cvs changelog
[packages/gated.git] / gated.init
CommitLineData
281b6206
JR
1#!/bin/sh
2#
3# gated This script is used to start/stop the gated routing
4# daemon
5#
d6c75e40 6# chkconfig: - 32 75
7# description: Starts and stops gated (routing daemon). GateD is a modular \
8# software program consisting of core services, a routing \
9# database, and protocol modules supporting multiple routing \
10# protocols (RIP versions 1 and 2, DCN HELLO, OSPF version 2, \
11# EGP version 2 and BGP version 2 through 4)
12# processname: gated
13# pidfile: /var/run/gated.pid
14# config: /etc/gated.conf
281b6206
JR
15
16# Source function library.
17. /etc/rc.d/init.d/functions
18
19# Source networking configuration.
20. /etc/sysconfig/network
21
22# Check that networking is up.
88cb07df 23if is_yes "${NETWORKING}"; then
bcd5885f 24 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
88cb07df 25 msg_network_down gated
26 exit 1
27 fi
28else
29 exit 0
30fi
281b6206
JR
31
32gdc=/usr/bin/gdc
33
34[ -f /etc/gated.conf ] || exit 0
35[ -f $gdc ] || exit 0
36
37PATH=$PATH:/usr/bin:/usr/sbin
38
39# See how we were called.
40case "$1" in
41 start)
88cb07df 42 if [ ! -f /var/lock/subsys/gated ]; then
43 msg_starting gated
44 daemon gated
45 touch /var/lock/subsys/gated
46 else
47 msg_already_running gated
88cb07df 48 fi
49 ;;
281b6206 50 stop)
88cb07df 51 if [ -f /var/lock/subsys/gated ]; then
52 # Stop daemons.
53 msg_stopping gated
54 busy
55 $gdc stop
56 ok
57 rm -f /var/lock/subsys/gated
58 else
59 msg_not_running gopherd
88cb07df 60 fi
61 ;;
281b6206
JR
62 status)
63 $gdc running
64 ;;
79353712 65 reload|force-reload)
281b6206
JR
66 $gdc reconfig
67 ;;
68 restart)
69 $gdc restart
70 ;;
71 *)
79353712 72 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
73 exit 3
281b6206
JR
74esac
75
76exit 0
This page took 0.084337 seconds and 4 git commands to generate.