5 # Required-Start: $local_fs $network $remote_fs $syslog
6 # Required-Stop: $local_fs $network $remote_fs $syslog
7 # Default-Start: 2 3 4 5
9 # Short-Description: start and stop the FRR routing suite
10 # Description: FRR is a routing suite for IP routing protocols like
11 # BGP, OSPF, RIP and others. This script contols the main
15 # This is the main init script for FRR. It mostly wraps frrcommon.sh which
16 # provides the actual functions to start/stop/restart things.
19 if [ -r "/lib/lsb/init-functions" ]; then
20 .
/lib
/lsb
/init-functions
34 if [ -r "$self/frrcommon.sh" ]; then
35 .
"$self/frrcommon.sh"
37 .
"@CFG_SBIN@/frrcommon.sh"
43 watchfrr_options
="$watchfrr_options $daemons"
49 exit ${still_running:-0}
57 watchfrr_options
="$watchfrr_options $daemons"
63 print_status watchfrr || fail
=1
69 if [ ! -x "$RELOAD_SCRIPT" ]; then
70 log_failure_msg
"The frr-pythontools package is required for reload functionality."
74 # restart watchfrr to pick up added daemons.
75 # NB: This will NOT cause the other daemons to be restarted.
77 watchfrr_options
="$watchfrr_options $daemons"
78 daemon_stop watchfrr
&& \
81 NEW_CONFIG_FILE
="${2:-$C_PATH/frr.conf}"
82 [ ! -r $NEW_CONFIG_FILE ] && log_failure_msg
"Unable to read new configuration file $NEW_CONFIG_FILE" && exit 1
83 "$RELOAD_SCRIPT" --reload "$NEW_CONFIG_FILE"
88 log_failure_msg
"Unknown command: $1" >&2