mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
watchfrr: Rename watchquagga -> watchfrr
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
9b532e09f9
commit
9473e34052
|
@ -2,11 +2,11 @@
|
|||
|
||||
SUBDIRS = lib qpb fpm @ZEBRA@ @LIBRFP@ @RFPTEST@ \
|
||||
@BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ @LDPD@ \
|
||||
@ISISD@ @PIMD@ @WATCHQUAGGA@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
|
||||
@ISISD@ @PIMD@ @WATCHFRR@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
|
||||
redhat @SOLARIS@ tests tools cumulus
|
||||
|
||||
DIST_SUBDIRS = lib qpb fpm zebra bgpd ripd ripngd ospfd ospf6d ldpd \
|
||||
isisd watchquagga vtysh ospfclient doc m4 pkgsrc redhat tests \
|
||||
isisd watchfrr vtysh ospfclient doc m4 pkgsrc redhat tests \
|
||||
solaris pimd @LIBRFP@ @RFPTEST@ tools cumulus
|
||||
|
||||
EXTRA_DIST = aclocal.m4 SERVICES REPORTING-BUGS \
|
||||
|
|
22
configure.ac
22
configure.ac
|
@ -213,8 +213,8 @@ AC_ARG_ENABLE(ospf6d,
|
|||
AS_HELP_STRING([--disable-ospf6d], [do not build ospf6d]))
|
||||
AC_ARG_ENABLE(ldpd,
|
||||
AS_HELP_STRING([--enable-ldpd], [build ldpd]))
|
||||
AC_ARG_ENABLE(watchquagga,
|
||||
AS_HELP_STRING([--disable-watchquagga], [do not build watchquagga]))
|
||||
AC_ARG_ENABLE(watchfrr,
|
||||
AS_HELP_STRING([--disable-watchfrr], [do not build watchfrr]))
|
||||
AC_ARG_ENABLE(isisd,
|
||||
AS_HELP_STRING([--disable-isisd], [do not build isisd]))
|
||||
AC_ARG_ENABLE(pimd,
|
||||
|
@ -1170,12 +1170,12 @@ else
|
|||
fi
|
||||
AM_CONDITIONAL(LDPD, test "x$LDPD" = "xldpd")
|
||||
|
||||
if test "${enable_watchquagga}" = "no";then
|
||||
WATCHQUAGGA=""
|
||||
if test "${enable_watchfrr}" = "no";then
|
||||
WATCHFRR=""
|
||||
else
|
||||
WATCHQUAGGA="watchquagga"
|
||||
WATCHFRR="watchfrr"
|
||||
fi
|
||||
AM_CONDITIONAL(WATCHQUAGGA, test "x$WATCHQUAGGA" = "xwatchquagga")
|
||||
AM_CONDITIONAL(WATCHFRR, test "x$WATCHFRR" = "xwatchfrr")
|
||||
|
||||
OSPFCLIENT=""
|
||||
if test "${enable_ospfapi}" != "no";then
|
||||
|
@ -1250,7 +1250,7 @@ AC_SUBST(RIPNGD)
|
|||
AC_SUBST(OSPFD)
|
||||
AC_SUBST(OSPF6D)
|
||||
AC_SUBST(LDPD)
|
||||
AC_SUBST(WATCHQUAGGA)
|
||||
AC_SUBST(WATCHFRR)
|
||||
AC_SUBST(ISISD)
|
||||
AC_SUBST(PIMD)
|
||||
AC_SUBST(SOLARIS)
|
||||
|
@ -1548,7 +1548,7 @@ AC_DEFINE_UNQUOTED(PATH_LDPD_PID, "$frr_statedir/ldpd.pid",ldpd PID)
|
|||
AC_DEFINE_UNQUOTED(LDPD_SOCKET, "$frr_statedir/ldpd.sock",ldpd control socket)
|
||||
AC_DEFINE_UNQUOTED(PATH_ISISD_PID, "$frr_statedir/isisd.pid",isisd PID)
|
||||
AC_DEFINE_UNQUOTED(PATH_PIMD_PID, "$frr_statedir/pimd.pid",pimd PID)
|
||||
AC_DEFINE_UNQUOTED(PATH_WATCHQUAGGA_PID, "$frr_statedir/watchquagga.pid",watchquagga PID)
|
||||
AC_DEFINE_UNQUOTED(PATH_WATCHFRR_PID, "$frr_statedir/watchfrr.pid",watchfrr PID)
|
||||
AC_DEFINE_UNQUOTED(ZEBRA_SERV_PATH, "$frr_statedir/zserv.api",zebra api socket)
|
||||
AC_DEFINE_UNQUOTED(ZEBRA_VTYSH_PATH, "$frr_statedir/zebra.vty",zebra vty socket)
|
||||
AC_DEFINE_UNQUOTED(RIP_VTYSH_PATH, "$frr_statedir/ripd.vty",rip vty socket)
|
||||
|
@ -1559,7 +1559,7 @@ AC_DEFINE_UNQUOTED(OSPF6_VTYSH_PATH, "$frr_statedir/ospf6d.vty",ospf6d vty socke
|
|||
AC_DEFINE_UNQUOTED(LDP_VTYSH_PATH, "$frr_statedir/ldpd.vty",ldpd vty socket)
|
||||
AC_DEFINE_UNQUOTED(ISIS_VTYSH_PATH, "$frr_statedir/isisd.vty",isisd vty socket)
|
||||
AC_DEFINE_UNQUOTED(PIM_VTYSH_PATH, "$frr_statedir/pimd.vty",pimd vty socket)
|
||||
AC_DEFINE_UNQUOTED(WATCHQUAGGA_VTYSH_PATH, "$frr_statedir/watchquagga.vty",watchquagga vty socket)
|
||||
AC_DEFINE_UNQUOTED(WATCHFRR_VTYSH_PATH, "$frr_statedir/watchfrr.vty",watchfrr vty socket)
|
||||
AC_DEFINE_UNQUOTED(DAEMON_VTY_DIR, "$frr_statedir",daemon vty directory)
|
||||
|
||||
dnl autoconf does this, but it does it too late...
|
||||
|
@ -1605,7 +1605,7 @@ AC_CACHE_VAL(ac_cv_htonl_works,
|
|||
AC_MSG_RESULT($ac_cv_htonl_works)
|
||||
|
||||
AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile
|
||||
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchquagga/Makefile
|
||||
ripngd/Makefile bgpd/Makefile ospfd/Makefile watchfrr/Makefile
|
||||
ospf6d/Makefile ldpd/Makefile isisd/Makefile vtysh/Makefile
|
||||
doc/Makefile ospfclient/Makefile tests/Makefile m4/Makefile
|
||||
pimd/Makefile
|
||||
|
@ -1629,7 +1629,7 @@ AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile
|
|||
doc/ripngd.8
|
||||
doc/pimd.8
|
||||
doc/vtysh.1
|
||||
doc/watchquagga.8
|
||||
doc/watchfrr.8
|
||||
doc/zebra.8
|
||||
doc/quagga.1
|
||||
pkgsrc/bgpd.sh pkgsrc/ospf6d.sh pkgsrc/ospfd.sh
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# When using "vtysh" such a config file is also needed. It should be owned by
|
||||
# group "quaggavty" and set to ug=rw,o= though. Check /etc/pam.d/quagga, too.
|
||||
#
|
||||
# The watchquagga daemon is always started. Per default in monitoring-only but
|
||||
# The watchfrr daemon is always started. Per default in monitoring-only but
|
||||
# that can be changed via /etc/quagga/debian.conf.
|
||||
#
|
||||
zebra=no
|
||||
|
|
|
@ -14,5 +14,5 @@ isisd_options=" --daemon -A 127.0.0.1"
|
|||
pimd_options=" --daemon -A 127.0.0.1"
|
||||
|
||||
# The list of daemons to watch is automatically generated by the init script.
|
||||
watchquagga_enable=yes
|
||||
watchquagga_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 30)
|
||||
watchfrr_enable=yes
|
||||
watchfrr_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 30)
|
||||
|
|
2
debian/quagga.install
vendored
2
debian/quagga.install
vendored
|
@ -15,7 +15,7 @@ usr/share/man/man8/ripd.8
|
|||
usr/share/man/man8/ripngd.8
|
||||
usr/share/man/man8/zebra.8
|
||||
usr/share/man/man8/isisd.8
|
||||
usr/share/man/man8/watchquagga.8
|
||||
usr/share/man/man8/watchfrr.8
|
||||
usr/share/snmp/mibs/
|
||||
cumulus/etc/* etc/
|
||||
tools/*.service lib/systemd/system
|
||||
|
|
2
debian/quagga.manpages
vendored
2
debian/quagga.manpages
vendored
|
@ -6,4 +6,4 @@ doc/ripngd.8
|
|||
doc/vtysh.1
|
||||
doc/zebra.8
|
||||
doc/isisd.8
|
||||
doc/watchquagga.8
|
||||
doc/watchfrr.8
|
||||
|
|
6
debian/watchquagga.rc
vendored
6
debian/watchquagga.rc
vendored
|
@ -1,4 +1,4 @@
|
|||
check process watchquagga with pidfile /var/run/quagga/watchquagga.pid
|
||||
start program = "/etc/init.d/quagga start watchquagga" with timeout 120 seconds
|
||||
stop program = "/etc/init.d/quagga stop watchquagga"
|
||||
check process watchfrr with pidfile /var/run/quagga/watchfrr.pid
|
||||
start program = "/etc/init.d/quagga start watchfrr" with timeout 120 seconds
|
||||
stop program = "/etc/init.d/quagga stop watchfrr"
|
||||
if 3 restarts within 10 cycles then timeout
|
||||
|
|
|
@ -115,8 +115,8 @@ if VTYSH
|
|||
man_MANS += vtysh.1
|
||||
endif
|
||||
|
||||
if WATCHQUAGGA
|
||||
man_MANS += watchquagga.8
|
||||
if WATCHFRR
|
||||
man_MANS += watchfrr.8
|
||||
endif
|
||||
|
||||
if ZEBRA
|
||||
|
@ -135,7 +135,7 @@ EXTRA_DIST = BGP-TypeCode draft-zebra-00.ms draft-zebra-00.txt \
|
|||
ripngd.8.in \
|
||||
pimd.8.in \
|
||||
vtysh.1.in \
|
||||
watchquagga.8.in \
|
||||
watchfrr.8.in \
|
||||
zebra.8.in \
|
||||
quagga.1.in \
|
||||
\
|
||||
|
|
|
@ -87,12 +87,12 @@ lost after doing a configuration save.
|
|||
@end quotation
|
||||
|
||||
Since the @command{vtysh} command may be running as ordinary user on the
|
||||
system, configuration writes will be tried through @command{watchquagga},
|
||||
system, configuration writes will be tried through @command{watchfrr},
|
||||
using the @command{write integrated} command internally. Since
|
||||
@command{watchquagga} is running as superuser, @command{vtysh} is able to
|
||||
@command{watchfrr} is running as superuser, @command{vtysh} is able to
|
||||
ensure correct ownership and permissions on @file{Quagga.conf}.
|
||||
|
||||
If @command{watchquagga} is not running or the configuration write fails,
|
||||
If @command{watchfrr} is not running or the configuration write fails,
|
||||
@command{vtysh} will attempt to directly write to the file. This is likely
|
||||
to fail if running as unprivileged user; alternatively it may leave the
|
||||
file with incorrect owner or permissions.
|
||||
|
@ -147,7 +147,7 @@ installations.
|
|||
|
||||
Unconditionally (regardless of @command{service integrated-vtysh-config}
|
||||
setting) write out integrated @file{Quagga.conf} file through
|
||||
@command{watchquagga}. If @command{watchquagga} is not running, this command
|
||||
@command{watchfrr}. If @command{watchfrr} is not running, this command
|
||||
is unavailable.
|
||||
|
||||
@end deffn
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
.\" This file was originally generated by help2man 1.36.
|
||||
.TH WATCHQUAGGA 8 "July 2010"
|
||||
.TH WATCHFRR 8 "July 2010"
|
||||
.SH NAME
|
||||
watchquagga \- a program to monitor the status of quagga daemons
|
||||
watchfrr \- a program to monitor the status of frr daemons
|
||||
.SH SYNOPSIS
|
||||
.B watchquagga
|
||||
.B watchfrr
|
||||
.RI [ option ...]
|
||||
.IR daemon ...
|
||||
.br
|
||||
.B watchquagga
|
||||
.B watchfrr
|
||||
.BR \-h " | " \-v
|
||||
.SH DESCRIPTION
|
||||
.B watchquagga
|
||||
is a watchdog program that monitors the status of supplied quagga
|
||||
.B watchfrr
|
||||
is a watchdog program that monitors the status of supplied frr
|
||||
.IR daemon s
|
||||
and tries to restart them in case they become unresponsive or shut down.
|
||||
.PP
|
||||
To determine whether a daemon is running, it tries to connect to the
|
||||
daemon's VTY UNIX stream socket, and send echo commands to ensure the
|
||||
daemon responds. When the daemon crashes, EOF is received from the socket,
|
||||
so that watchquagga can react immediately.
|
||||
so that watchfrr can react immediately.
|
||||
.PP
|
||||
This program can run in one of the following 5 modes:
|
||||
.TP
|
||||
.B Mode 0: monitor
|
||||
In this mode, the program serves as a monitor and reports status changes.
|
||||
.IP
|
||||
Example usage: watchquagga \-d zebra ospfd bgpd
|
||||
Example usage: watchfrr \-d zebra ospfd bgpd
|
||||
.TP
|
||||
.B Mode 1: global restart
|
||||
In this mode, whenever a daemon hangs or crashes, the given command is used
|
||||
to restart all watched daemons.
|
||||
.IP
|
||||
Example usage: watchquagga \-dz \e
|
||||
Example usage: watchfrr \-dz \e
|
||||
.br
|
||||
-R '/sbin/service zebra restart; /sbin/service ospfd restart' \e
|
||||
.br
|
||||
|
@ -41,7 +41,7 @@ zebra ospfd
|
|||
In this mode, whenever a single daemon hangs or crashes, the given command
|
||||
is used to restart this daemon only.
|
||||
.IP
|
||||
Example usage: watchquagga \-dz \-r '/sbin/service %s restart' \e
|
||||
Example usage: watchfrr \-dz \-r '/sbin/service %s restart' \e
|
||||
.br
|
||||
zebra ospfd bgpd
|
||||
.TP
|
||||
|
@ -52,7 +52,7 @@ daemon; in this case, the following steps are taken: (1) all other daemons
|
|||
are stopped, (2) zebra is restarted, and (3) other daemons are started
|
||||
again.
|
||||
.IP
|
||||
Example usage: watchquagga \-adz \-r '/sbin/service %s restart' \e
|
||||
Example usage: watchfrr \-adz \-r '/sbin/service %s restart' \e
|
||||
.br
|
||||
\-s '/sbin/service %s start' \e
|
||||
.br
|
||||
|
@ -63,7 +63,7 @@ In this mode, whenever a single daemon hangs or crashes, the following
|
|||
steps are taken: (1) all other daemons are stopped, (2) zebra is restarted,
|
||||
and (3) other daemons are started again.
|
||||
.IP
|
||||
Example usage: watchquagga \-Adz \-r '/sbin/service %s restart' \e
|
||||
Example usage: watchfrr \-Adz \-r '/sbin/service %s restart' \e
|
||||
.br
|
||||
\-s '/sbin/service %s start' \e
|
||||
.br
|
||||
|
@ -95,7 +95,7 @@ instead of standard output (stdout).
|
|||
.BI \-S " directory" "\fR, \fB\-\-statedir " directory
|
||||
Set the VTY socket
|
||||
.I directory
|
||||
(the default value is "/var/run/quagga").
|
||||
(the default value is "/var/run/frr").
|
||||
.TP
|
||||
.BR \-e ", " \-\-no\-echo
|
||||
Do not ping the daemons to test whether they respond. This option is
|
||||
|
@ -196,7 +196,7 @@ options to be specified.
|
|||
.BI \-p " filename" "\fR, \fB\-\-pid\-file " filename
|
||||
Set the process identifier
|
||||
.I filename
|
||||
(the default value is "/var/run/quagga/watchquagga.pid").
|
||||
(the default value is "/var/run/frr/watchfrr.pid").
|
||||
.TP
|
||||
.BI \-b " string" "\fR, \fB\-\-blank\-string " string
|
||||
When the supplied
|
|
@ -4220,7 +4220,7 @@ install_default (enum node_type node)
|
|||
*
|
||||
* terminal = 0 -- vtysh / no logging, no config control
|
||||
* terminal = 1 -- normal daemon
|
||||
* terminal = -1 -- watchquagga / no logging, but minimal config control */
|
||||
* terminal = -1 -- watchfrr / no logging, but minimal config control */
|
||||
void
|
||||
cmd_init (int terminal)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ const char *zlog_proto_names[] =
|
|||
"ISIS",
|
||||
"PIM",
|
||||
"RFP",
|
||||
"WATCHQUAGGA",
|
||||
"WATCHFRR",
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ typedef enum
|
|||
ZLOG_ISIS,
|
||||
ZLOG_PIM,
|
||||
ZLOG_RFP,
|
||||
ZLOG_WATCHQUAGGA,
|
||||
ZLOG_WATCHFRR,
|
||||
} zlog_proto_t;
|
||||
|
||||
/* If maxlvl is set to ZLOG_DISABLED, then no messages will be sent
|
||||
|
|
|
@ -2240,7 +2240,7 @@ vtysh_read (struct thread *thread)
|
|||
if (ret == CMD_SUSPEND)
|
||||
break;
|
||||
|
||||
/* warning: watchquagga hardcodes this result write */
|
||||
/* warning: watchfrr hardcodes this result write */
|
||||
header[3] = ret;
|
||||
buffer_put(vty->obuf, header, 4);
|
||||
|
||||
|
|
|
@ -3,6 +3,6 @@ EXTRA_DIST = bgpd.init isisd.init \
|
|||
ospf6d.init ospfd.init ldpd.init \
|
||||
quagga.logrotate quagga.pam quagga.spec \
|
||||
quagga.sysconfig ripd.init ripngd.init \
|
||||
watchquagga.init pimd.init zebra.init \
|
||||
watchfrr.init pimd.init zebra.init \
|
||||
README.rpm_build.md
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ Building your own Quagga RPM
|
|||
%{!?quagga_user: %global quagga_user quagga }
|
||||
%{!?vty_group: %global vty_group quaggavt }
|
||||
%{!?with_fpm: %global with_fpm 0 }
|
||||
%{!?with_watchquagga: %global with_watchquagga 1 }
|
||||
%{!?with_watchfrr: %global with_watchfrr 1 }
|
||||
|
||||
6. Build the RPM
|
||||
|
||||
|
@ -84,11 +84,11 @@ Enabling daemons after installation of the package:
|
|||
chkconfig bgpd on
|
||||
... etc
|
||||
|
||||
2. If you want to run `watchquagga`, then configure `/etc/sysconfig/quagga`
|
||||
and uncomment the line with the daemons for `watchquagga` to monitor,
|
||||
then enable watchquagga
|
||||
2. If you want to run `watchfrr`, then configure `/etc/sysconfig/quagga`
|
||||
and uncomment the line with the daemons for `watchfrr` to monitor,
|
||||
then enable watchfrr
|
||||
|
||||
chkconfig watchquagga on
|
||||
chkconfig watchfrr on
|
||||
|
||||
3. Check your firewall / IPtables to make sure the routing protocols are
|
||||
allowed.
|
||||
|
@ -113,7 +113,7 @@ Configuration is stored in `/etc/quagga/*.conf` files.
|
|||
systemctl enable bgpd
|
||||
... etc
|
||||
|
||||
Note: There is no watchquagga on systemd based systems. Systemd contains
|
||||
Note: There is no watchfrr on systemd based systems. Systemd contains
|
||||
the functionality of monitoring and restarting daemons.
|
||||
|
||||
2. Check your firewall / IPtables to make sure the routing protocols are
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
%{!?quagga_user: %global quagga_user quagga }
|
||||
%{!?vty_group: %global vty_group quaggavty }
|
||||
%{!?with_fpm: %global with_fpm 0 }
|
||||
%{!?with_watchquagga: %global with_watchquagga 1 }
|
||||
%{!?with_watchfrr: %global with_watchfrr 1 }
|
||||
%{!?with_bgp_vnc: %global with_bgp_vnc 0 }
|
||||
|
||||
# path defines
|
||||
|
@ -52,13 +52,13 @@
|
|||
# Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7)
|
||||
%{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)}
|
||||
#
|
||||
# If init system is systemd, then always disable watchquagga
|
||||
# If init system is systemd, then always disable watchfrr
|
||||
#
|
||||
%if "%{initsystem}" == "systemd"
|
||||
# Note: For systems with systemd, watchquagga will NOT be built. Systemd
|
||||
# Note: For systems with systemd, watchfrr will NOT be built. Systemd
|
||||
# takes over the role of restarting crashed processes. Value will
|
||||
# be overwritten with 0 below for systemd independent on the setting here
|
||||
%global with_watchquagga 1
|
||||
%global with_watchfrr 1
|
||||
%endif
|
||||
|
||||
# if FPM is enabled, then enable tcp_zebra as well
|
||||
|
@ -80,13 +80,13 @@
|
|||
%define daemon_ldpd ""
|
||||
%endif
|
||||
|
||||
%if %{with_watchquagga}
|
||||
%define daemon_watchquagga watchquagga
|
||||
%if %{with_watchfrr}
|
||||
%define daemon_watchfrr watchfrr
|
||||
%else
|
||||
%define daemon_watchquagga ""
|
||||
%define daemon_watchfrr ""
|
||||
%endif
|
||||
|
||||
%define all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_watchquagga}
|
||||
%define all_daemons %{daemon_list} %{daemon_ldpd} %{daemon_watchfrr}
|
||||
|
||||
# allow build dir to be kept
|
||||
%{!?keep_build: %global keep_build 0 }
|
||||
|
@ -232,10 +232,10 @@ developing OSPF-API and quagga applications.
|
|||
%else
|
||||
--disable-fpm \
|
||||
%endif
|
||||
%if %{with_watchquagga}
|
||||
--enable-watchquagga \
|
||||
%if %{with_watchfrr}
|
||||
--enable-watchfrr \
|
||||
%else
|
||||
--disable-watchquagga \
|
||||
--disable-watchfrr \
|
||||
%endif
|
||||
%if %{with_bgp_vnc}
|
||||
--enable-bgp-vnc \
|
||||
|
@ -371,9 +371,9 @@ for daemon in %{all_daemons} ; do
|
|||
%endif
|
||||
fi
|
||||
done
|
||||
%if %{with_watchquagga}
|
||||
# No config for watchquagga - this is part of /etc/sysconfig/quagga
|
||||
rm -f %{_sysconfdir}/watchquagga.*
|
||||
%if %{with_watchfrr}
|
||||
# No config for watchfrr - this is part of /etc/sysconfig/quagga
|
||||
rm -f %{_sysconfdir}/watchfrr.*
|
||||
%endif
|
||||
|
||||
if [ ! -e %{_sysconfdir}/vtysh.conf ]; then
|
||||
|
@ -397,16 +397,16 @@ if [ "$1" -ge 1 ]; then
|
|||
# Rename restart flags for daemons handled specially.
|
||||
running_zebra="$restart_zebra"
|
||||
restart_zebra=no
|
||||
%if %{with_watchquagga}
|
||||
running_watchquagga="$restart_watchquagga"
|
||||
restart_watchquagga=no
|
||||
%if %{with_watchfrr}
|
||||
running_watchfrr="$restart_watchfrr"
|
||||
restart_watchfrr=no
|
||||
%endif
|
||||
|
||||
%if "%{initsystem}" == "systemd"
|
||||
##
|
||||
## Systemd Version
|
||||
##
|
||||
# No watchquagga for systemd version
|
||||
# No watchfrr for systemd version
|
||||
#
|
||||
# Stop all daemons other than zebra.
|
||||
for daemon in %all_daemons ; do
|
||||
|
@ -427,12 +427,12 @@ if [ "$1" -ge 1 ]; then
|
|||
##
|
||||
## init.d Version
|
||||
##
|
||||
%if %{with_watchquagga}
|
||||
# Stop watchquagga first.
|
||||
[ "$running_watchquagga" = yes ] && \
|
||||
/etc/rc.d/init.d/watchquagga stop >/dev/null 2>&1
|
||||
%if %{with_watchfrr}
|
||||
# Stop watchfrr first.
|
||||
[ "$running_watchfrr" = yes ] && \
|
||||
/etc/rc.d/init.d/watchfrr stop >/dev/null 2>&1
|
||||
%endif
|
||||
# Stop all daemons other than zebra and watchquagga.
|
||||
# Stop all daemons other than zebra and watchfrr.
|
||||
for daemon in %all_daemons ; do
|
||||
eval restart=\$restart_${daemon}
|
||||
[ "$restart" = yes ] && \
|
||||
|
@ -441,18 +441,18 @@ if [ "$1" -ge 1 ]; then
|
|||
# Restart zebra.
|
||||
[ "$running_zebra" = yes ] && \
|
||||
/etc/rc.d/init.d/zebra restart >/dev/null 2>&1
|
||||
# Start all daemons other than zebra and watchquagga.
|
||||
# Start all daemons other than zebra and watchfrr.
|
||||
for daemon in %all_daemons ; do
|
||||
eval restart=\$restart_${daemon}
|
||||
[ "$restart" = yes ] && \
|
||||
/etc/rc.d/init.d/${daemon} start >/dev/null 2>&1
|
||||
done
|
||||
%if %{with_watchquagga}
|
||||
# Start watchquagga last.
|
||||
# Avoid postun scriptlet error if watchquagga is not running.
|
||||
[ "$running_watchquagga" = yes ] && \
|
||||
/etc/rc.d/init.d/watchquagga start >/dev/null 2>&1 || :
|
||||
%endif
|
||||
%if %{with_watchfrr}
|
||||
# Start watchfrr last.
|
||||
# Avoid postun scriptlet error if watchfrr is not running.
|
||||
[ "$running_watchfrr" = yes ] && \
|
||||
/etc/rc.d/init.d/watchfrr start >/dev/null 2>&1 || :
|
||||
%endif
|
||||
%endif
|
||||
fi
|
||||
|
||||
|
@ -513,8 +513,8 @@ rm -rf %{buildroot}
|
|||
%{_sbindir}/quagga-reload.py
|
||||
%{_sbindir}/quagga-reload.pyc
|
||||
%{_sbindir}/quagga-reload.pyo
|
||||
%if %{with_watchquagga}
|
||||
%{_sbindir}/watchquagga
|
||||
%if %{with_watchfrr}
|
||||
%{_sbindir}/watchfrr
|
||||
%endif
|
||||
%{_sbindir}/ripngd
|
||||
%{_sbindir}/ospf6d
|
||||
|
@ -533,8 +533,8 @@ rm -rf %{buildroot}
|
|||
%config %{_unitdir}/quagga.service
|
||||
%else
|
||||
%config /etc/rc.d/init.d/zebra
|
||||
%if %{with_watchquagga}
|
||||
%config /etc/rc.d/init.d/watchquagga
|
||||
%if %{with_watchfrr}
|
||||
%config /etc/rc.d/init.d/watchfrr
|
||||
%endif
|
||||
%config /etc/rc.d/init.d/ripd
|
||||
%config /etc/rc.d/init.d/ospfd
|
||||
|
@ -586,7 +586,7 @@ rm -rf %{buildroot}
|
|||
- Add conditional logic to only build tex footnotes with supported texi2html
|
||||
- Added pimd to files section and fix double listing of /var/lib*/quagga
|
||||
- Numerous fixes to unify upstart/systemd startup into same spec file
|
||||
- Only allow use of watchquagga for non-systemd systems. no need with systemd
|
||||
- Only allow use of watchfrr for non-systemd systems. no need with systemd
|
||||
|
||||
* Fri Sep 4 2015 Paul Jakma <paul@jakma.org>
|
||||
- buildreq updates
|
||||
|
@ -607,7 +607,7 @@ rm -rf %{buildroot}
|
|||
- daemonv6_list should contain only IPv6 daemons
|
||||
|
||||
* Wed Dec 22 2004 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||
- watchquagga added
|
||||
- watchfrr added
|
||||
- on upgrade, all daemons should be condrestart'ed
|
||||
- on removal, all daemons should be stopped
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ ZEBRA_OPTS="-A 127.0.0.1"
|
|||
PIMD_OPTS="-A 127.0.0.1"
|
||||
LDPD_OPTS="-A 127.0.0.1"
|
||||
|
||||
# Watchquagga configuration for LSB initscripts
|
||||
# Watchfrr configuration for LSB initscripts
|
||||
#
|
||||
# (Not needed with systemd: the service files are configured to automatically
|
||||
# restart any daemon on failure. If zebra fails, all running daemons will be
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
# chkconfig: 2345 17 83
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: watchquagga
|
||||
# Short-Description: Quagga watchdog
|
||||
# Description: Quagga watchdog for use with Zebra
|
||||
# Provides: watchfrr
|
||||
# Short-Description: Frr watchdog
|
||||
# Description: Frr watchdog for use with Zebra
|
||||
### END INIT INFO
|
||||
|
||||
# source function library
|
||||
|
@ -13,13 +13,13 @@
|
|||
# Get network config
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# quagga command line options
|
||||
# frr command line options
|
||||
. /etc/sysconfig/quagga
|
||||
|
||||
RETVAL=0
|
||||
PROG="watchquagga"
|
||||
cmd=watchquagga
|
||||
LOCK_FILE=/var/lock/subsys/watchquagga
|
||||
PROG="watchfrr"
|
||||
cmd=watchfrr
|
||||
LOCK_FILE=/var/lock/subsys/watchfrr
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
|
|
|
@ -8,7 +8,7 @@ f none @sbindir@/ripd=$DESTDIR/@sbindir@/ripd 0755 root bin
|
|||
f none @sbindir@/ripngd=$DESTDIR/@sbindir@/ripngd 0755 root bin
|
||||
f none @sbindir@/ospfd=$DESTDIR/@sbindir@/ospfd 0755 root bin
|
||||
f none @sbindir@/ospf6d=$DESTDIR/@sbindir@/ospf6d 0755 root bin
|
||||
f none @sbindir@/watchquagga=$DESTDIR/@sbindir@/watchquagga 0755 root bin
|
||||
f none @sbindir@/watchfrr=$DESTDIR/@sbindir@/watchfrr 0755 root bin
|
||||
d none @sysconfdir@=$DESTDIR/@sysconfdir@ 0711 @enable_user@ @enable_group@
|
||||
f none @sysconfdir@/zebra.conf.sample=$DESTDIR/@sysconfdir@/zebra.conf.sample 0644 root bin
|
||||
f none @sysconfdir@/bgpd.conf.sample=$DESTDIR/@sysconfdir@/bgpd.conf.sample 0644 root bin
|
||||
|
|
54
tools/quagga
54
tools/quagga
|
@ -20,7 +20,7 @@ V_PATH=/var/run/quagga
|
|||
|
||||
# Local Daemon selection may be done by using /etc/quagga/daemons.
|
||||
# See /usr/share/doc/quagga/README.Debian.gz for further information.
|
||||
# Keep zebra first and do not list watchquagga!
|
||||
# Keep zebra first and do not list watchfrr!
|
||||
DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd"
|
||||
MAX_INSTANCES=5
|
||||
RELOAD_SCRIPT=/usr/lib/quagga/quagga-reload.py
|
||||
|
@ -79,7 +79,7 @@ check_daemon()
|
|||
|
||||
# vtysh_enable has no config file nor binary so skip check.
|
||||
# (Not sure why vtysh_enable is in this list but does not hurt)
|
||||
if [ $1 != "watchquagga" -a $1 != "vtysh_enable" ]; then
|
||||
if [ $1 != "watchfrr" -a $1 != "vtysh_enable" ]; then
|
||||
# check for daemon binary
|
||||
if [ ! -x "$D_PATH/$1" ]; then return 1; fi
|
||||
|
||||
|
@ -102,29 +102,29 @@ check_daemon()
|
|||
start()
|
||||
{
|
||||
ulimit -n $MAX_FDS
|
||||
if [ "$1" = "watchquagga" ]; then
|
||||
if [ "$1" = "watchfrr" ]; then
|
||||
|
||||
# We may need to restart watchquagga if new daemons are added and/or
|
||||
# We may need to restart watchfrr if new daemons are added and/or
|
||||
# removed
|
||||
if started "$1" ; then
|
||||
stop watchquagga
|
||||
stop watchfrr
|
||||
else
|
||||
# Echo only once. watchquagga is printed in the stop above
|
||||
# Echo only once. watchfrr is printed in the stop above
|
||||
echo -n " $1"
|
||||
fi
|
||||
|
||||
if [ -e /var/run/quagga/watchquagga.started ] ; then
|
||||
rm /var/run/quagga/watchquagga.started
|
||||
if [ -e /var/run/quagga/watchfrr.started ] ; then
|
||||
rm /var/run/quagga/watchfrr.started
|
||||
fi
|
||||
${SSD} \
|
||||
--start \
|
||||
--pidfile=`pidfile $1` \
|
||||
--exec "$D_PATH/$1" \
|
||||
-- \
|
||||
"${watchquagga_options[@]}"
|
||||
"${watchfrr_options[@]}"
|
||||
for i in `seq 1 10`;
|
||||
do
|
||||
if [ -e /var/run/quagga/watchquagga.started ] ; then
|
||||
if [ -e /var/run/quagga/watchfrr.started ] ; then
|
||||
break
|
||||
else
|
||||
sleep 1
|
||||
|
@ -203,7 +203,7 @@ stop()
|
|||
# Converts values from /etc/quagga/daemons to all-numeric values.
|
||||
convert_daemon_prios()
|
||||
{
|
||||
for name in $DAEMONS zebra vtysh_enable watchquagga_enable; do
|
||||
for name in $DAEMONS zebra vtysh_enable watchfrr_enable; do
|
||||
# First, assign the value set by the user to $value
|
||||
eval value=\${${name}:0:3}
|
||||
|
||||
|
@ -224,8 +224,8 @@ convert_daemon_prios()
|
|||
done
|
||||
}
|
||||
|
||||
# Starts watchquagga for all wanted daemons.
|
||||
start_watchquagga()
|
||||
# Starts watchfrr for all wanted daemons.
|
||||
start_watchfrr()
|
||||
{
|
||||
local daemon_name
|
||||
local daemon_prio
|
||||
|
@ -233,14 +233,14 @@ start_watchquagga()
|
|||
local daemon_inst
|
||||
|
||||
# Start the monitor daemon only if desired.
|
||||
if [ 0 -eq "$watchquagga_enable" ]; then
|
||||
if [ 0 -eq "$watchfrr_enable" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Check variable type
|
||||
if ! declare -p watchquagga_options | grep -q '^declare \-a'; then
|
||||
if ! declare -p watchfrr_options | grep -q '^declare \-a'; then
|
||||
echo
|
||||
echo "ERROR: The variable watchquagga_options from /etc/quagga/debian.cnf must be a BASH array!"
|
||||
echo "ERROR: The variable watchfrr_options from /etc/quagga/debian.cnf must be a BASH array!"
|
||||
echo "ERROR: Please convert config file and restart!"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -256,13 +256,13 @@ start_watchquagga()
|
|||
eval "inst_disable=\${${daemon_name}_${inst}}"
|
||||
if [ -z ${inst_disable} ] || [ ${inst_disable} != 0 ]; then
|
||||
if check_daemon $daemon_name $inst; then
|
||||
watchquagga_options+=("${daemon_name}-${inst}")
|
||||
watchfrr_options+=("${daemon_name}-${inst}")
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
if check_daemon $daemon_name; then
|
||||
watchquagga_options+=($daemon_name)
|
||||
watchfrr_options+=($daemon_name)
|
||||
fi
|
||||
fi
|
||||
found_one=1
|
||||
|
@ -272,16 +272,16 @@ start_watchquagga()
|
|||
# Start if at least one daemon is activated.
|
||||
if [ $found_one -eq 1 ]; then
|
||||
echo -n "Starting Quagga monitor daemon:"
|
||||
start watchquagga
|
||||
start watchfrr
|
||||
echo "."
|
||||
fi
|
||||
}
|
||||
|
||||
# Stopps watchquagga.
|
||||
stop_watchquagga()
|
||||
# Stopps watchfrr.
|
||||
stop_watchfrr()
|
||||
{
|
||||
echo -n "Stopping Quagga monitor daemon:"
|
||||
stop watchquagga
|
||||
stop watchfrr
|
||||
echo "."
|
||||
}
|
||||
|
||||
|
@ -509,10 +509,10 @@ case "$1" in
|
|||
|
||||
# Start all daemons
|
||||
cd $C_PATH/
|
||||
if [ "$2" != "watchquagga" ]; then
|
||||
if [ "$2" != "watchfrr" ]; then
|
||||
start_prio 10 $dmn
|
||||
fi
|
||||
start_watchquagga
|
||||
start_watchfrr
|
||||
vtysh_b
|
||||
;;
|
||||
|
||||
|
@ -525,8 +525,8 @@ case "$1" in
|
|||
|
||||
stop|0)
|
||||
# Stop all daemons at level '0' or 'stop'
|
||||
stop_watchquagga
|
||||
if [ "$dmn" != "watchquagga" ]; then
|
||||
stop_watchfrr
|
||||
if [ "$dmn" != "watchfrr" ]; then
|
||||
[ -n "${dmn}" ] && eval "${dmn/-/_}=0"
|
||||
stop_prio 0 $dmn
|
||||
fi
|
||||
|
@ -536,7 +536,7 @@ case "$1" in
|
|||
ip route flush proto zebra
|
||||
else
|
||||
[ -n "$dmn" ] && eval "${dmn/-/_}=0"
|
||||
start_watchquagga
|
||||
start_watchfrr
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ vtysh_cmd_FILES = $(vtysh_scan) \
|
|||
$(top_srcdir)/zebra/zebra_fpm.c \
|
||||
$(top_srcdir)/zebra/zebra_ptm.c \
|
||||
$(top_srcdir)/zebra/zebra_mpls_vty.c \
|
||||
$(top_srcdir)/watchquagga/watchquagga_vty.c \
|
||||
$(top_srcdir)/watchfrr/watchfrr_vty.c \
|
||||
$(BGP_VNC_RFAPI_SRC) $(BGP_VNC_RFP_SRC)
|
||||
|
||||
vtysh_cmd.c: $(vtysh_cmd_FILES) extract.pl
|
||||
|
|
|
@ -73,7 +73,7 @@ struct vtysh_client vtysh_client[] =
|
|||
{ .fd = -1, .name = "bgpd", .flag = VTYSH_BGPD, .path = BGP_VTYSH_PATH, .next = NULL},
|
||||
{ .fd = -1, .name = "isisd", .flag = VTYSH_ISISD, .path = ISIS_VTYSH_PATH, .next = NULL},
|
||||
{ .fd = -1, .name = "pimd", .flag = VTYSH_PIMD, .path = PIM_VTYSH_PATH, .next = NULL},
|
||||
{ .fd = -1, .name = "watchquagga", .flag = VTYSH_WATCHQUAGGA, .path = WATCHQUAGGA_VTYSH_PATH, .next = NULL},
|
||||
{ .fd = -1, .name = "watchfrr", .flag = VTYSH_WATCHFRR, .path = WATCHFRR_VTYSH_PATH, .next = NULL},
|
||||
};
|
||||
|
||||
enum vtysh_write_integrated vtysh_write_integrated = WRITE_INTEGRATED_UNSPECIFIED;
|
||||
|
@ -2592,7 +2592,7 @@ DEFUN (vtysh_write_memory,
|
|||
{
|
||||
ret = CMD_WARNING;
|
||||
for (i = 0; i < array_size(vtysh_client); i++)
|
||||
if (vtysh_client[i].flag == VTYSH_WATCHQUAGGA)
|
||||
if (vtysh_client[i].flag == VTYSH_WATCHFRR)
|
||||
break;
|
||||
if (i < array_size(vtysh_client) && vtysh_client[i].fd != -1)
|
||||
ret = vtysh_client_execute (&vtysh_client[i], "write integrated", stdout);
|
||||
|
@ -2600,7 +2600,7 @@ DEFUN (vtysh_write_memory,
|
|||
if (ret != CMD_SUCCESS)
|
||||
{
|
||||
printf("\nWarning: attempting direct configuration write without "
|
||||
"watchquagga.\nFile permissions and ownership may be "
|
||||
"watchfrr.\nFile permissions and ownership may be "
|
||||
"incorrect, or write may fail.\n\n");
|
||||
ret = vtysh_write_config_integrated();
|
||||
}
|
||||
|
|
|
@ -34,11 +34,11 @@ DECLARE_MGROUP(MVTYSH)
|
|||
#define VTYSH_ISISD 0x40
|
||||
#define VTYSH_PIMD 0x100
|
||||
#define VTYSH_LDPD 0x200
|
||||
#define VTYSH_WATCHQUAGGA 0x400
|
||||
#define VTYSH_WATCHFRR 0x400
|
||||
|
||||
/* commands in REALLYALL are crucial to correct vtysh operation */
|
||||
#define VTYSH_REALLYALL ~0U
|
||||
/* watchquagga is not in ALL since library CLI functions should not be
|
||||
/* watchfrr is not in ALL since library CLI functions should not be
|
||||
* run on it (logging & co. should stay in a fixed/frozen config, and
|
||||
* things like prefix lists are not even initialised) */
|
||||
#define VTYSH_ALL VTYSH_ZEBRA|VTYSH_RIPD|VTYSH_RIPNGD|VTYSH_OSPFD|VTYSH_OSPF6D|VTYSH_LDPD|VTYSH_BGPD|VTYSH_ISISD|VTYSH_PIMD
|
||||
|
|
2
watchquagga/.gitignore → watchfrr/.gitignore
vendored
2
watchquagga/.gitignore → watchfrr/.gitignore
vendored
|
@ -1,7 +1,7 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
*.o
|
||||
watchquagga
|
||||
watchfrr
|
||||
tags
|
||||
TAGS
|
||||
.deps
|
|
@ -5,9 +5,9 @@ DEFS = @DEFS@ -DSTATEDIR=\"$(localstatedir)/\"
|
|||
|
||||
AM_CFLAGS = $(WERROR)
|
||||
|
||||
sbin_PROGRAMS = watchquagga
|
||||
sbin_PROGRAMS = watchfrr
|
||||
|
||||
noinst_HEADERS = watchquagga.h
|
||||
noinst_HEADERS = watchfrr.h
|
||||
|
||||
watchquagga_SOURCES = watchquagga.c watchquagga_vty.c
|
||||
watchquagga_LDADD = ../lib/libzebra.la @LIBCAP@
|
||||
watchfrr_SOURCES = watchfrr.c watchfrr_vty.c
|
||||
watchfrr_LDADD = ../lib/libzebra.la @LIBCAP@
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Monitor status of quagga daemons and restart if necessary.
|
||||
Monitor status of frr daemons and restart if necessary.
|
||||
|
||||
Copyright (C) 2004 Andrew J. Schorr
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
#include <memory.h>
|
||||
#include <systemd.h>
|
||||
|
||||
#include "watchquagga.h"
|
||||
#include "watchfrr.h"
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(X,Y) (((X) <= (Y)) ? (X) : (Y))
|
||||
|
@ -49,10 +49,10 @@
|
|||
#define DEFAULT_LOGLEVEL LOG_INFO
|
||||
#define DEFAULT_MIN_RESTART 60
|
||||
#define DEFAULT_MAX_RESTART 600
|
||||
#ifdef PATH_WATCHQUAGGA_PID
|
||||
#define DEFAULT_PIDFILE PATH_WATCHQUAGGA_PID
|
||||
#ifdef PATH_WATCHFRR_PID
|
||||
#define DEFAULT_PIDFILE PATH_WATCHFRR_PID
|
||||
#else
|
||||
#define DEFAULT_PIDFILE STATEDIR "/watchquagga.pid"
|
||||
#define DEFAULT_PIDFILE STATEDIR "/watchfrr.pid"
|
||||
#endif
|
||||
#ifdef DAEMON_VTY_DIR
|
||||
#define VTYDIR DAEMON_VTY_DIR
|
||||
|
@ -223,7 +223,7 @@ usage(const char *progname, int status)
|
|||
else
|
||||
{
|
||||
printf("Usage : %s [OPTION...] <daemon name> ...\n\n\
|
||||
Watchdog program to monitor status of quagga daemons and try to restart\n\
|
||||
Watchdog program to monitor status of frr daemons and try to restart\n\
|
||||
them if they are down or unresponsive. It determines whether a daemon is\n\
|
||||
up based on whether it can connect to the daemon's vty unix stream socket.\n\
|
||||
It then repeatedly sends echo commands over that socket to determine whether\n\
|
||||
|
@ -706,10 +706,10 @@ daemon_send_ready (void)
|
|||
#if defined (HAVE_CUMULUS)
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen(DAEMON_VTY_DIR "/watchquagga.started", "w");
|
||||
fp = fopen(DAEMON_VTY_DIR "/watchfrr.started", "w");
|
||||
fclose(fp);
|
||||
#endif
|
||||
zlog_notice ("Watchquagga: Notifying Systemd we are up and running");
|
||||
zlog_notice ("Watchfrr: Notifying Systemd we are up and running");
|
||||
systemd_send_started(master, 0);
|
||||
sent = 1;
|
||||
}
|
||||
|
@ -1062,7 +1062,7 @@ translate_blanks(const char *cmd, const char *blankstr)
|
|||
return res;
|
||||
}
|
||||
|
||||
struct zebra_privs_t watchquagga_privs =
|
||||
struct zebra_privs_t watchfrr_privs =
|
||||
{
|
||||
#ifdef VTY_GROUP
|
||||
.vty_group = VTY_GROUP,
|
||||
|
@ -1325,14 +1325,14 @@ main(int argc, char **argv)
|
|||
|
||||
gs.restart.interval = gs.min_restart_interval;
|
||||
|
||||
zprivs_init (&watchquagga_privs);
|
||||
zprivs_init (&watchfrr_privs);
|
||||
|
||||
master = thread_master_create();
|
||||
cmd_init(-1);
|
||||
memory_init();
|
||||
vty_init(master);
|
||||
watchquagga_vty_init();
|
||||
vty_serv_sock(NULL, 0, WATCHQUAGGA_VTYSH_PATH);
|
||||
watchfrr_vty_init();
|
||||
vty_serv_sock(NULL, 0, WATCHFRR_VTYSH_PATH);
|
||||
|
||||
signal_init (master, array_size(my_signals), my_signals);
|
||||
srandom(time(NULL));
|
||||
|
@ -1384,7 +1384,7 @@ main(int argc, char **argv)
|
|||
return usage(progname,1);
|
||||
}
|
||||
|
||||
zlog_default = openzlog(progname, ZLOG_WATCHQUAGGA, 0,
|
||||
zlog_default = openzlog(progname, ZLOG_WATCHFRR, 0,
|
||||
LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON);
|
||||
zlog_set_level(NULL, ZLOG_DEST_MONITOR, ZLOG_DISABLED);
|
||||
if (daemon_mode)
|
||||
|
@ -1392,7 +1392,7 @@ main(int argc, char **argv)
|
|||
zlog_set_level(NULL, ZLOG_DEST_SYSLOG, MIN(gs.loglevel,LOG_DEBUG));
|
||||
if (daemon (0, 0) < 0)
|
||||
{
|
||||
fprintf(stderr, "Watchquagga daemon failed: %s", strerror(errno));
|
||||
fprintf(stderr, "Watchfrr daemon failed: %s", strerror(errno));
|
||||
exit (1);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Common definitions for watchquagga API socket.
|
||||
Common definitions for watchfrr API socket.
|
||||
|
||||
Copyright (C) 2016 David Lamparter for NetDEF, Inc.
|
||||
|
||||
|
@ -18,12 +18,12 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef QUAGGA_WATCHQUAGGA_H
|
||||
#define QUAGGA_WATCHQUAGGA_H
|
||||
#ifndef FRR_WATCHFRR_H
|
||||
#define FRR_WATCHFRR_H
|
||||
|
||||
extern void watchquagga_vty_init(void);
|
||||
extern void watchfrr_vty_init(void);
|
||||
|
||||
extern pid_t integrated_write_pid;
|
||||
extern void integrated_write_sigchld(int status);
|
||||
|
||||
#endif /* QUAGGA_WATCHQUAGGA_H */
|
||||
#endif /* FRR_WATCHFRR_H */
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
watchquagga CLI functions.
|
||||
watchfrr CLI functions.
|
||||
|
||||
Copyright (C) 2016 David Lamparter for NetDEF, Inc.
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
|||
#include "vty.h"
|
||||
#include "command.h"
|
||||
|
||||
#include "watchquagga.h"
|
||||
#include "watchfrr.h"
|
||||
|
||||
pid_t integrated_write_pid;
|
||||
static int integrated_result_fd;
|
||||
|
@ -35,7 +35,7 @@ DEFUN (config_write_integrated,
|
|||
config_write_integrated_cmd,
|
||||
"write integrated",
|
||||
"Write running configuration to memory, network, or terminal\n"
|
||||
"Write integrated all-daemon Quagga.conf file\n")
|
||||
"Write integrated all-daemon Frr.conf file\n")
|
||||
{
|
||||
pid_t child;
|
||||
sigset_t oldmask, sigmask;
|
||||
|
@ -69,7 +69,7 @@ DEFUN (config_write_integrated,
|
|||
/* note: the VTY won't write a command return value to vtysh; the
|
||||
* session temporarily enters an intentional "hang" state. This is
|
||||
* to make sure latency in vtysh doing the config write (several
|
||||
* seconds is not rare to see) does not interfere with watchquagga's
|
||||
* seconds is not rare to see) does not interfere with watchfrr's
|
||||
* supervisor job.
|
||||
*
|
||||
* The fd is duplicated here so we don't need to hold a vty pointer
|
||||
|
@ -127,7 +127,7 @@ void integrated_write_sigchld(int status)
|
|||
integrated_write_pid = -1;
|
||||
}
|
||||
|
||||
void watchquagga_vty_init(void)
|
||||
void watchfrr_vty_init(void)
|
||||
{
|
||||
integrated_write_pid = -1;
|
||||
install_element(ENABLE_NODE, &config_write_integrated_cmd);
|
Loading…
Reference in a new issue