Allow users to specify exactly which Quagga daemons should be started
using the rc.conf mechanism. Define variables quagga_flags and quagga_daemons to control startup behaviour. Submitted by: Boris Kovalenko (maintainer)
This commit is contained in:
parent
823dac3dec
commit
90989805df
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=102715
1 changed files with 10 additions and 6 deletions
|
@ -2,14 +2,19 @@
|
|||
#
|
||||
|
||||
# PROVIDE: quagga
|
||||
# REQUIRE: netif routing
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
# REQUIRE: netif routing mountcritlocal
|
||||
# BEFORE: NETWORKING
|
||||
# KEYWORD: FreeBSD NetBSD
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable quagga:
|
||||
#
|
||||
#quagga_enable="YES"
|
||||
#
|
||||
# You may also use next flags to tune startup
|
||||
#quagga_flags="-d"
|
||||
#quagga_daemons="zebra ripd ripng ospfd ospf6d bgpd"
|
||||
#
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
|
@ -28,10 +33,9 @@ stop_postcmd()
|
|||
|
||||
quagga_enable=${quagga_enable:-"NO"}
|
||||
quagga_flags=${quagga_flags:-"-d"}
|
||||
quagga_daemons=${quagga_daemons:-"zebra ripd ripng ospfd ospf6d bgpd"}
|
||||
load_rc_config $name
|
||||
|
||||
QUAGGA_DAEMONS="zebra ripd ripng ospfd ospf6d bgpd"
|
||||
|
||||
quagga_cmd=$1
|
||||
|
||||
case "$1" in
|
||||
|
@ -44,10 +48,10 @@ case "$1" in
|
|||
esac
|
||||
|
||||
if [ ${quagga_cmd} = "stop" ]; then
|
||||
QUAGGA_DAEMONS=$(reverse_list ${QUAGGA_DAEMONS})
|
||||
quagga_daemons=$(reverse_list ${quagga_daemons})
|
||||
fi
|
||||
|
||||
for daemon in ${QUAGGA_DAEMONS}; do
|
||||
for daemon in ${quagga_daemons}; do
|
||||
command=%%PREFIX%%/sbin/${daemon}
|
||||
required_files=%%SYSCONF_DIR%%/${daemon}.conf
|
||||
pidfile=%%LOCALSTATE_DIR%%/${daemon}.pid
|
||||
|
|
Loading…
Reference in a new issue