summaryrefslogtreecommitdiffstats
path: root/tools/frrinit.sh.in (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tools: Ignore errors for frr reload stuffDonatas Abraitis2023-06-301-1/+1
| | | | | | | | | | | | | | | When we pass an unknown/wrong command and do `systemctl reload frr`, all processes are killed, and not started up. Like doing with frr-reload.py, all good: ``` $ /usr/lib/frr/frr-reload.py --reload /etc/frr/frr.conf vtysh failed to process new configuration: vtysh (mark file) exited with status 2: b'line 20: % Unknown command: neighbor 192.168.10.123 bfd 300 300\n\n' ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* tools: Set correct directory of vtysh for frr-reload.pyDonatas Abraitis2023-03-241-1/+1
| | | | | | | | Before it was setting SDIR, which is /usr/lib/frr, but the vtysh binary is put under bindir (which is /usr/local by default). And running `/usr/lib/frr/frr reload` failed. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* tools: Honor sysdir, confdir, bindir for frr-reload.py from "frr" wrapperDonatas Abraitis2022-11-031-1/+1
| | | | | | | Without this, those variables are not passed to frr-reload.py and uses default values. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* tools: Improve usage example for frrinit.shDonatas Abraitis2022-04-201-1/+2
| | | | | | | | | | | ``` root@spine1-debian-11:~/frr# /usr/lib/frr/frrinit.sh Usage: /usr/lib/frr/frrinit.sh <start|stop|restart|force-reload|reload|status> [namespace] /usr/lib/frr/frrinit.sh stop namespace1 ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* tools: Print usage for frrinit.sh when running without argumentsDonatas Abraitis2022-04-191-1/+3
| | | | | | | | | | ``` root@spine1-debian-11:~/frr# /usr/lib/frr/frrinit.sh Usage: /usr/lib/frr/frrinit.sh (start|stop|restart|force-reload|reload|status) ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* tools: Replace `strings` to `tr` for frrinit.shDonatas Abraitis2022-03-241-1/+1
| | | | | | | | | | dc3bae68a2422ead82a12fa8480417fd4e351cdd added strings command, which is wrong. It requires additional package to be installed on the system (binutils). Let's just get use `tr`. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
* tools: Stop disabled daemons when doing reloadDonatas Abraitis2022-01-311-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After: ``` root@exit1-debian-11:~# grep ripngd= /etc/frr/daemons ripngd=no root@exit1-debian-11:~# pgrep -f ripngd -c 0 root@exit1-debian-11:~# sed -i 's/ripngd=no/ripngd=yes/' /etc/frr/daemons root@exit1-debian-11:~# /usr/lib/frr/frrinit.sh reload Stopped watchfrr. Started watchfrr. root@exit1-debian-11:~# pgrep -f ripngd -c 2 root@exit1-debian-11:~# grep ripngd= /etc/frr/daemons ripngd=yes root@exit1-debian-11:~# sed -i 's/ripngd=yes/ripngd=no/' /etc/frr/daemons root@exit1-debian-11:~# /usr/lib/frr/frrinit.sh reload Stopped watchfrr. Started watchfrr. Stopped ripngd. root@exit1-debian-11:~# pgrep -f ripngd -c 0 ``` Before: ``` root@exit1-debian-11:~# grep ripngd= /etc/frr/daemons ripngd=no root@exit1-debian-11:~# pgrep -f ripngd -c 0 root@exit1-debian-11:~# sed -i 's/ripngd=no/ripngd=yes/' /etc/frr/daemons root@exit1-debian-11:~# /usr/lib/frr/frrinit.sh reload Stopped watchfrr. Started watchfrr. root@exit1-debian-11:~# pgrep -f ripngd -c 2 root@exit1-debian-11:~# grep ripngd= /etc/frr/daemons ripngd=yes root@exit1-debian-11:~# sed -i 's/ripngd=yes/ripngd=no/' /etc/frr/daemons root@exit1-debian-11:~# /usr/lib/frr/frrinit.sh reload Stopped watchfrr. Started watchfrr. Stopped ripngd. root@exit1-debian-11:~# pgrep -f ripngd -c 1 <<<<<< ripngd is running, while watchfrr skips it ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
* watchfrr: add (network) namespace supportDavid Lamparter2020-07-221-1/+4
| | | | | | | This adds -N and --netns options to watchfrr, allowing it to start daemons with -N and switching network namespaces respectively. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* tools: retain sanity when reloading under systemdDavid Lamparter2019-06-101-0/+25
| | | | | | | | | Without this, we end up restarting watchfrr with the systemd watchdog non-functional & tripped a bit later. Also, if watchfrr is in the "control" cgroup, systemd 232 will kill it. (241 apparently doesn't. Can't find anything about this in systemd's ChangeLog though.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* watchfrr: build in defaults for -r/-s/-kDavid Lamparter2019-02-191-1/+1
| | | | | | | | | There's no good reason to not have these options default to the installation path of tools/watchfrr.sh. Doing so allows us to ditch watchfrr_options from daemons/daemons.conf completely. Fixes: #3652 Signed-off-by: David Lamparter <equinox@diac24.net>
* debian/tools: new init scriptDavid Lamparter2018-12-061-0/+90
This separates the init script used for the system (and called in the systemd unit file) from the script that watchfrr uses to control daemons. Mixing these two caused the entire thing to become a rather huge spaghetti mess. Note that there is a behaviour change in that the new script always starts zebra regardless of zebra_enable. Side changes: - Ubuntu 12.04 removed from backports since it doesn't work anyway - zebra is always started regardless of zebra_enable. To disable FRR, the entire init script should be disabled through policy. - no-watchfrr operation is no longer supported by the scripts in the Debian packages. (This is intentional.) Signed-off-by: David Lamparter <equinox@diac24.net>