mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 15:10:38 +00:00
Adding redhat init/service files to start pimd
Added missing pimd.init (for RedHat/CentOS <= 6) and pimd.service (for RedHat/CentOS >= 7) Signed-off-by: Martin Winter <mwinter@opensourcerouting.org> (cherry picked from commit fca2c24ff21a9d837229bc40e462c6615e368123)
This commit is contained in:
parent
7c08d77fbc
commit
dba5a06285
@ -3,4 +3,4 @@ EXTRA_DIST = bgpd.init bgpd.service isisd.init \
|
||||
isisd.service ospf6d.init ospf6d.service ospfd.init ospfd.service \
|
||||
quagga.logrotate quagga.pam quagga.pam.stack quagga.spec \
|
||||
quagga.sysconfig ripd.init ripd.service ripngd.init ripngd.service \
|
||||
watchquagga.init zebra.init zebra.service
|
||||
watchquagga.init pimd.init pimd.service zebra.init zebra.service
|
||||
|
72
redhat/pimd.init
Normal file
72
redhat/pimd.init
Normal file
@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
# chkconfig: - 16 84
|
||||
# config: /etc/quagga/pimd.conf
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: pimd
|
||||
# Short-Description: PIM multicast routing engine
|
||||
# Description: PIM routing engine for use with Zebra
|
||||
### END INIT INFO
|
||||
|
||||
# source function library
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
# Get network config
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# quagga command line options
|
||||
. /etc/sysconfig/quagga
|
||||
|
||||
RETVAL=0
|
||||
PROG="pimd"
|
||||
cmd=pimd
|
||||
LOCK_FILE=/var/lock/subsys/pimd
|
||||
CONF_FILE=/etc/quagga/pimd.conf
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
# Check that networking is up.
|
||||
[ "${NETWORKING}" = "no" ] && exit 1
|
||||
|
||||
# The process must be configured first.
|
||||
[ -f $CONF_FILE ] || exit 6
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo $"Insufficient privilege" 1>&2
|
||||
exit 4
|
||||
fi
|
||||
|
||||
echo -n $"Starting $PROG: "
|
||||
daemon $cmd -d $PIMD_OPTS -f $CONF_FILE
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && touch $LOCK_FILE
|
||||
echo
|
||||
;;
|
||||
stop)
|
||||
echo -n $"Shutting down $PROG: "
|
||||
killproc $cmd
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && rm -f $LOCK_FILE
|
||||
echo
|
||||
;;
|
||||
restart|reload|force-reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
RETVAL=$?
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
if [ -f $LOCK_FILE ]; then
|
||||
$0 stop
|
||||
$0 start
|
||||
fi
|
||||
RETVAL=$?
|
||||
;;
|
||||
status)
|
||||
status $cmd
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}"
|
||||
exit 2
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
14
redhat/pimd.service
Normal file
14
redhat/pimd.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=PIM multicast routing engine
|
||||
BindTo=zebra.service
|
||||
After=syslog.target network.target zebra.service
|
||||
ConditionPathExists=/etc/quagga/pimd.conf
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
EnvironmentFile=/etc/sysconfig/quagga
|
||||
ExecStart=/usr/sbin/pimd -d $PIMD_OPTS -f /etc/quagga/pimd.conf
|
||||
Restart=on-abort
|
||||
|
||||
[Install]
|
||||
WantedBy=network.target
|
Loading…
Reference in New Issue
Block a user