summaryrefslogtreecommitdiff
path: root/net-misc/frr
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-16 03:56:47 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-16 03:56:47 +0100
commit01f09076452fe45dac176dc2c4fff1ba81f3b5e0 (patch)
tree205749ce37d614687dcd3bc65f54a4b7514f85a0 /net-misc/frr
parent4fe36de7142d972c061813e413f66ed4bcfc38d0 (diff)
gentoo auto-resync : 16:10:2023 - 03:56:47
Diffstat (limited to 'net-misc/frr')
-rw-r--r--net-misc/frr/Manifest1
-rw-r--r--net-misc/frr/files/frr-openrc-v1301
2 files changed, 0 insertions, 302 deletions
diff --git a/net-misc/frr/Manifest b/net-misc/frr/Manifest
index ac0fc0a7b7ac..94eaeb750b09 100644
--- a/net-misc/frr/Manifest
+++ b/net-misc/frr/Manifest
@@ -1,6 +1,5 @@
AUX frr-7.5-ipctl-forwarding.patch 731 BLAKE2B 9c97d7fdc7b7facb59a73f4b693c285ebd91cb0ba8f7fea0ef49d5eddd8660100315ca7d74ece8d553cdd8ad79a9a0b1a4c173c6dedf90e0be2bdc72d948b2be SHA512 56bdeb8a1f350fea3ad8ed0cdba28964b00384878853e584746d8ce80c6f9ea5ca5adc4539e314f7fd82203c08d5f2ce6adeec61dac9a7a28282131d0d371447
AUX frr-8.4.1-logrotate.patch 2487 BLAKE2B f3eb9b9ce25dd9dd796668ecef5dfeb51b5f3ea3428ef4c03bd78becaf26deb5cb59aa56918fdc3c0230a8905d7edf4a12582ab4e6f7d297e3c94c62b7468b0c SHA512 8658dd1280d201d9f3a7f8caa6c5bf513133a3928ba97334202b0fed84dc03f12c82d76cbb8aeae3f363024d2373161c9bda74e1d9a27a085071c524c9941ad0
-AUX frr-openrc-v1 7078 BLAKE2B d5c0276540fa09318f6e92575dd7e03f3bc6ebfce186d062c2d65fa49c502b3b4de0fd32914ce7c4708bb6f6188296f75d387e0384c142381bb77cfb706c7e1c SHA512 8e6f0e58863402f0169b8a7625d049bf85db60bebe40a42dfb450a1bddfcd6f8f436002de6c1ff599c8f848e4ba85a70e4058cb55a9a49fafb1e69a8e7eb9f57
AUX frr-openrc-v2 7079 BLAKE2B abbad56f0715b79ba5ba24df373ccb8ab63caa12b04d892693b060c771d47323fd7fcebd9b5688720d4aded23fcb79a36e89a7734b315b0862d16e5ce08d8b10 SHA512 5744c433fd983a56abb8f45e34229b3ab3a03c3e9d5532e2b30a31f3e875076fb56b81a06e661dba7df9f76e463190e831c82ae79deefe1add22d7f0365098ce
AUX frr.pam 969 BLAKE2B 227dc91f51fab504229fa5489486fed1aa393d33c024849724ea3fb934e3fd78ee6c9147240133d458ec52021f13e8a27a2d8a0b4625415007c4595222b815ee SHA512 9a169d58232eba7481aee83d92b4e104b6c4ca95e5b31befe29117fbcebc187ad87c061f37ec7c571ff5702101a329ae0c113cf714e2d0dcd39ca4212734a9ed
DIST frr-9.0.1.tar.gz 10334150 BLAKE2B c5f0d092421cdaea400e669973da3d53d9875871488be3b5e8c2c9afa78bf357a775671756eacb94372c5067a8a1284cb4feb4927988e0f1a42d19239a871f3b SHA512 fa1884529a98c8e5ad2dab7f6f67246844ea34ba4d68e3a907a01d43e0eec9317104107f5f18e4b61c11d2cbb4d20eac1e8aef6e4a2b2e54efcad245ee3fb6b9
diff --git a/net-misc/frr/files/frr-openrc-v1 b/net-misc/frr/files/frr-openrc-v1
deleted file mode 100644
index 3f9da62e2a18..000000000000
--- a/net-misc/frr/files/frr-openrc-v1
+++ /dev/null
@@ -1,301 +0,0 @@
-#!/sbin/openrc-run
-#
-# FRR OpenRC init script.
-#
-# Copyright (C) 2020 Rafael F. Zalamena
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; only version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-description="FRR initialization script."
-
-# FRR variables.
-frr_dir="/usr/lib/frr"
-frr_state_dir="/run/frr"
-config_file="/etc/frr/frr.conf"
-daemon_file="/etc/frr/daemons"
-daemon_db="/run/frrdb"
-vty_config_file="/etc/frr/vtysh.conf"
-frr_reload="$frr_dir/frr-reload.py"
-frr_reload_log="$frr_state_dir/reload.log"
-
-# Don't change profile here, use $daemon_file. This is the default.
-frr_profile="traditional"
-
-# watchfrr variables.
-watchfrr_daemons=''
-watchfrr_pidfile="$frr_state_dir/watchfrr.pid"
-
-#
-# Helpers.
-#
-_check_daemon_binary() {
- local daemon=$1
-
- [ -x "$frr_dir/$daemon" ] && return 0
-
- eerror "No binary found for $daemon in $frr_dir"
- return 1
-}
-
-_load_daemon_list() {
- # Load FRR daemons configuration file.
- while read line <&3 ; do
- case $line in
- ""|"#"*)
- # Skip empty/commented lines.
- continue
- ;;
-
- *d=*|*_instances=*|*_options=*|*_wrap=*)
- # Load daemon options.
- eval "$line"
- ;;
-
- MAX_FDS=*|frr_profile=*|vtysh_enable=*)
- # Load misc configuration.
- eval "$line"
- ;;
- esac
- done 3< $daemon_file
-
- # `zebra` and `staticd` are mandatory.
- _check_daemon_binary 'zebra' || return 1
- _check_daemon_binary 'staticd' || return 1
- watchfrr_daemons='zebra staticd'
-
- # Create the watchfrr command line.
- for daemon in \
- babeld bfdd bgpd eigrpd fabricd isisd ldpd nhrpd ospfd ospf6d pbrd \
- pimd ripd ripngd sharpd vrrpd \
- ; do
- # Trick to read variable name with variable.
- cdaemon=$(eval echo \$$daemon)
- cdaemon_instances=$(eval echo \$${daemon}_instances)
-
- # Add daemon to command line if specified.
- if [ ! -z $cdaemon ] && [ $cdaemon = 'yes' ]; then
- _check_daemon_binary $daemon || return 1
-
- # Multi instance daemon handling.
- if [ ! -z $cdaemon_instances ]; then
- for instance in $(echo $cdaemon_instances | tr ',' ' '); do
- watchfrr_daemons="$watchfrr_daemons $daemon-$instance"
- done
- continue
- fi
-
- # Single instance daemon handling.
- watchfrr_daemons="$watchfrr_daemons $daemon"
- continue
- fi
- done
-}
-
-_frr_start() {
- # Apply MAX_FDS configuration if set.
- if [ ! -z $MAX_FDS ]; then
- veinfo " Setting maximum file descriptors to ${MAX_FDS}"
- ulimit -n $MAX_FDS >/dev/null 2>/dev/null
- fi
-
- # Save started daemons to state database.
- rm -f -- $daemon_db
- for daemon in $watchfrr_daemons; do
- echo $daemon >> $daemon_db
- veinfo " Starting $daemon..."
- done
-
- veinfo " Starting watchfrr..."
-
- # Start watchfrr which will start all configured daemons.
- eval $all_wrap $frr_dir/watchfrr -d -F $frr_profile $watchfrr_daemons
-
- veinfo " Loading configuration..."
-
- # After starting the daemons, lets load the configuration.
- if [ $vtysh_enable = 'yes' ]; then
- vtysh -b -n
- else
- veinfo " Configuration loading disabled (vtysh_enable=$vtysh_enable)"
- fi
-}
-
-_get_pid() {
- local daemon=$1
- local pid_file="$frr_state_dir/$daemon.pid"
-
- # Test for file existence.
- if [ ! -r "$pid_file" ]; then
- eerror "Failed to find or read $daemon pid file"
- return 1
- fi
-
- # Get PID if any.
- pid=$(cat $pid_file)
- if [ -z $pid ]; then
- eerror "$daemon PID file empty"
- return 1
- fi
-
- return 0
-}
-
-_stop_daemon() {
- local daemon=$1
- local pid_file="$frr_state_dir/$daemon.pid"
-
- # Get daemon pid.
- _get_pid $daemon
-
- # Ask daemon to quit.
- kill -2 "$pid"
-
- # Test if daemon is still running.
- attempts=1200
- while kill -0 "$pid" 2>/dev/null; do
- sleep 0.5
- [ $((attempts - 1)) -gt 0 ] || break
- done
-
- # Tell user about our situation.
- if kill -0 "$pid" 2>/dev/null ; then
- eerror "Failed to stop $daemon (PID=${pid})"
- return 1
- else
- rm -f -- $pid_file
- fi
-}
-
-_frr_stop() {
- local failures=0
-
- # Stop watchfrr first so it doesn't restart anyone.
- veinfo " Stopping watchfrr..."
- _stop_daemon watchfrr || failures=1
-
- # Read started daemon database.
- while read line <&3 ; do
- case $line in
- ""|"#"*)
- # Skip empty/commented lines.
- continue
- ;;
-
- *)
- # Get daemon name.
- veinfo " Stopping $line..."
- _stop_daemon $line || failures=1
- ;;
- esac
- done 3< $daemon_db
-
- # Remove daemon database file.
- rm -f -- $daemon_db
-
- return $failures
-}
-
-_check_watchfrr() {
- _get_pid watchfrr || return 1
- return 0
-}
-
-#
-# Main.
-#
-depend() {
- # We need root to write logs.
- need localmount
- # Optionally wait for network to start.
- use net
- # Expect /run to be ready.
- after bootmisc
-}
-
-start_pre() {
- # Check configuration file readability.
- checkpath -f -m 0640 -o frr:frr $vty_config_file
- checkpath -f -m 0640 -o frr:frr $daemon_file
- checkpath -f -m 0640 -o frr:frr $config_file
-
- # Check run state directory.
- checkpath -d -o frr $frr_state_dir
-
- # Load daemon list and peform checks.
- _load_daemon_list
-}
-
-start() {
- # Load daemon list.
- _load_daemon_list
-
- # Handle restarts.
- if [ "$RC_CMD" = 'restart' ]; then
- ebegin 'Reloading FRR configuration'
- else
- ebegin 'Starting FRR'
- fi
-
- # Start FRR.
- _frr_start
-
- # New daemons and watchfrr started, apply new configuration.
- if [ "$RC_CMD" = 'restart' ]; then
- "$frr_reload" --reload "$config_file" 2>/run/frr/reload.log
- [ $? -ne 0 ] && ewarn " Failed to reload (check $frr_reload_log)"
- # NOTE: we can't return bad status otherwise OpenRC will think we
- # failed to start, lets print a helpful message instead.
- fi
-
- eend 0
-}
-
-stop() {
- local failures=0
-
- # Handle restarts.
- if [ "$RC_CMD" = 'restart' ]; then
- # Load daemon list.
- _load_daemon_list
-
- # We must restart 'watchfrr' in order to start new daemons.
- veinfo " Stopping watchfrr..."
- _stop_daemon watchfrr
-
- # Stop daemons that are no longer in configuration file.
- for daemon in $(ls -1 /run/frr/*.pid | cut -d '.' -f 1); do
- # Filter daemon name.
- daemon=$(basename "$daemon")
-
- # Skip watchfrr.
- [ "$daemon" = 'watchfrr' ] && continue
-
- echo "$watchfrr_daemons" | grep "$daemon" >/dev/null
- if [ $? -ne 0 ]; then
- veinfo " Stopping $daemon..."
- _stop_daemon $daemon
- fi
- done
-
- return 0
- fi
-
- ebegin 'Stopping FRR'
- _frr_stop || failures=1
- eend $failures 'some daemons failed to stop'
-}
-
-status() {
- _check_watchfrr || return 1
-}