Compare commits
3 Commits
0d0d8c9ec3
...
eaafcbee01
Author | SHA1 | Date |
---|---|---|
Alarig Le Lay | eaafcbee01 | |
Alarig Le Lay | 4c2d09c3f1 | |
Alarig Le Lay | cc0be16cd9 |
|
@ -1,11 +0,0 @@
|
|||
DEFINED_PHASES=prepare
|
||||
DEPEND=dev-util/debootstrap
|
||||
DESCRIPTION=Debian live system build components
|
||||
EAPI=8
|
||||
HOMEPAGE=https://wiki.debian.org/DebianLive
|
||||
KEYWORDS=~amd64
|
||||
LICENSE=GPL-3
|
||||
RDEPEND=dev-util/debootstrap
|
||||
SLOT=0
|
||||
SRC_URI=mirror://debian/pool/main/l/live-build/live-build_20210407.tar.xz
|
||||
_md5_=5730b0a1c10421cb6ccd80d6041b351f
|
|
@ -1,15 +0,0 @@
|
|||
BDEPEND=python_targets_python3_10? ( >=dev-lang/python-3.10.12:3.10 ) python_targets_python3_11? ( >=dev-lang/python-3.11.4:3.11 ) >=dev-python/gpep517-13[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/setuptools-67.7.2[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/wheel-0.40.0[python_targets_python3_10(-)?,python_targets_python3_11(-)?]
|
||||
DEFINED_PHASES=compile configure install prepare test
|
||||
DESCRIPTION=dmidecode py
|
||||
EAPI=8
|
||||
HOMEPAGE=https://pypi.org/project/dmidecode/
|
||||
INHERIT=distutils-r1 pypi
|
||||
IUSE=python_targets_python3_10 python_targets_python3_11
|
||||
KEYWORDS=~amd64
|
||||
LICENSE=MIT
|
||||
RDEPEND=python_targets_python3_10? ( >=dev-lang/python-3.10.12:3.10 ) python_targets_python3_11? ( >=dev-lang/python-3.11.4:3.11 )
|
||||
REQUIRED_USE=|| ( python_targets_python3_10 python_targets_python3_11 )
|
||||
SLOT=0
|
||||
SRC_URI=https://files.pythonhosted.org/packages/source/d/dmidecode/dmidecode-0.9.0.tar.gz
|
||||
_eclasses_=out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild bddcb51b74f4a76724ff7cf8e7388869 multilib c19072c3cd7ac5cb21de013f7e9832e0 toolchain-funcs 513c31b3346458ed1f3878b57da6d61c multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 ninja-utils 76050953ad5b70d7e09a6ca55558db92 python-utils-r1 a013e16d5d896b3d8be68dd2a0e846ea python-r1 3c6cd0f418ba702c186a9865b85e704d distutils-r1 1c9a447ab8b90199e719e0e3a9a5cb00 pypi 6b97d2db40ff6be180030687e6003199
|
||||
_md5_=086267a112face7584b2b552a85bf95b
|
|
@ -1,16 +0,0 @@
|
|||
BDEPEND=test? ( dev-python/click[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/mypy_extensions[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/packaging[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/pathspec[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/platformdirs[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/tomli[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/typing-extensions[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/pytest-7.3.1[python_targets_python3_10(-)?,python_targets_python3_11(-)?] ) python_targets_python3_10? ( >=dev-lang/python-3.10.12:3.10 ) python_targets_python3_11? ( >=dev-lang/python-3.11.4:3.11 ) >=dev-python/gpep517-13[python_targets_python3_10(-)?,python_targets_python3_11(-)?] >=dev-python/poetry-core-1.6.1[python_targets_python3_10(-)?,python_targets_python3_11(-)?]
|
||||
DEFINED_PHASES=compile configure install prepare test
|
||||
DESCRIPTION=python library to parse the output of dmidecode
|
||||
EAPI=8
|
||||
HOMEPAGE=https://pypi.org/project/py-dmidecode/ https://github.com/zaibon/py-dmidecode
|
||||
INHERIT=distutils-r1 pypi
|
||||
IUSE=test python_targets_python3_10 python_targets_python3_11
|
||||
KEYWORDS=~amd64
|
||||
LICENSE=Apache-2.0
|
||||
RDEPEND=dev-python/click[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/mypy_extensions[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/packaging[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/pathspec[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/platformdirs[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/tomli[python_targets_python3_10(-)?,python_targets_python3_11(-)?] dev-python/typing-extensions[python_targets_python3_10(-)?,python_targets_python3_11(-)?] python_targets_python3_10? ( >=dev-lang/python-3.10.12:3.10 ) python_targets_python3_11? ( >=dev-lang/python-3.11.4:3.11 )
|
||||
REQUIRED_USE=|| ( python_targets_python3_10 python_targets_python3_11 )
|
||||
RESTRICT=!test? ( test )
|
||||
SLOT=0
|
||||
SRC_URI=https://files.pythonhosted.org/packages/source/p/py-dmidecode/py_dmidecode-0.1.1.tar.gz
|
||||
_eclasses_=out-of-source-utils 1a9007554652a6e627edbccb3c25a439 multibuild bddcb51b74f4a76724ff7cf8e7388869 multilib c19072c3cd7ac5cb21de013f7e9832e0 toolchain-funcs 513c31b3346458ed1f3878b57da6d61c multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 ninja-utils 76050953ad5b70d7e09a6ca55558db92 python-utils-r1 a013e16d5d896b3d8be68dd2a0e846ea python-r1 3c6cd0f418ba702c186a9865b85e704d distutils-r1 1c9a447ab8b90199e719e0e3a9a5cb00 pypi 6b97d2db40ff6be180030687e6003199
|
||||
_md5_=9e96acd00bdeebaf4334c9c067af1277
|
|
@ -1,16 +0,0 @@
|
|||
BDEPEND=virtual/pkgconfig
|
||||
DEFINED_PHASES=compile install postinst prepare setup
|
||||
DEPEND=dev-libs/openssl:0= virtual/libcrypt:= activefilter? ( net-libs/libpcap ) atm? ( net-dialup/linux-atm ) gtk? ( x11-libs/gtk+:2 ) pam? ( sys-libs/pam ) systemd? ( sys-apps/systemd )
|
||||
DESCRIPTION=Point-to-Point Protocol (PPP)
|
||||
EAPI=7
|
||||
HOMEPAGE=https://ppp.samba.org/
|
||||
INHERIT=linux-info pam toolchain-funcs
|
||||
IUSE=activefilter atm dhcp +eap-tls gtk ipv6 pam radius systemd
|
||||
KEYWORDS=~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86
|
||||
LICENSE=BSD GPL-2
|
||||
PDEPEND=net-dialup/ppp-scripts
|
||||
RDEPEND=dev-libs/openssl:0= virtual/libcrypt:= activefilter? ( net-libs/libpcap ) atm? ( net-dialup/linux-atm ) gtk? ( x11-libs/gtk+:2 ) pam? ( sys-libs/pam ) systemd? ( sys-apps/systemd ) !<net-misc/netifrc-0.7.1-r2
|
||||
SLOT=0/2.4.9
|
||||
SRC_URI=https://github.com/ppp-project/ppp/archive/refs/tags/ppp-2.4.9.tar.gz https://dev.gentoo.org/~polynomial-c/ppp-2.4.9-patches-03.tar.xz http://www.netservers.net.uk/gpl/ppp-dhcpc.tgz
|
||||
_eclasses_=toolchain-funcs 513c31b3346458ed1f3878b57da6d61c multilib c19072c3cd7ac5cb21de013f7e9832e0 linux-info c4f1201b96a8a2c1f3b86cc8b2c71c91 flag-o-matic ad475baa777c9978fa035216c8264a10 pam 4efe951aa8ce2c16288d7c915196fe29
|
||||
_md5_=e0aa2523f093f4b25f6e842bf411464b
|
|
@ -1,9 +0,0 @@
|
|||
DEFINED_PHASES=-
|
||||
DESCRIPTION=Meta ebuild for GNU Mailman 3
|
||||
EAPI=7
|
||||
HOMEPAGE=https://list.org/
|
||||
KEYWORDS=~amd64
|
||||
LICENSE=metapackage
|
||||
RDEPEND=>=net-mail/mailman-3.0 net-mail/postorius net-mail/hyperkitty
|
||||
SLOT=0
|
||||
_md5_=b62dc9481c698f624fb6ed5880a78cd0
|
|
@ -8,10 +8,10 @@ INHERIT=autotools pam python-single-r1 systemd
|
|||
IUSE=doc fpm grpc ipv6 nhrp ospfapi pam rpki snmp test python_single_target_python3_10 python_single_target_python3_11
|
||||
KEYWORDS=~amd64 ~arm64 ~x86
|
||||
LICENSE=GPL-2
|
||||
RDEPEND=python_single_target_python3_10? ( >=dev-lang/python-3.10.12:3.10 ) python_single_target_python3_11? ( >=dev-lang/python-3.11.4:3.11 ) acct-user/frr dev-libs/json-c:0= >=net-libs/libyang-2.0.0 sys-libs/libcap sys-libs/readline:0= virtual/libcrypt:= grpc? ( net-libs/grpc:= ) nhrp? ( net-dns/c-ares:0= ) pam? ( sys-libs/pam ) rpki? ( >=net-libs/rtrlib-0.8.0[ssh] ) snmp? ( net-analyzer/net-snmp:= ) python_single_target_python3_10? ( dev-python/ipaddr[python_targets_python3_10(-)] ) python_single_target_python3_11? ( dev-python/ipaddr[python_targets_python3_11(-)] ) !net-misc/quagga
|
||||
RDEPEND=python_single_target_python3_10? ( >=dev-lang/python-3.10.12:3.10 ) python_single_target_python3_11? ( >=dev-lang/python-3.11.4:3.11 ) acct-user/frr dev-libs/json-c:0= >=net-libs/libyang-2.0.0 sys-libs/libcap sys-libs/readline:0= virtual/libcrypt:= grpc? ( net-libs/grpc:= ) nhrp? ( net-dns/c-ares:0= ) pam? ( sys-libs/pam ) rpki? ( >=net-libs/rtrlib-0.8.0[ssh] ) snmp? ( net-analyzer/net-snmp:= ) python_single_target_python3_10? ( dev-python/ipaddr[python_targets_python3_10(-)] ) python_single_target_python3_11? ( dev-python/ipaddr[python_targets_python3_11(-)] ) !net-misc/quagga sys-apps/util-linux
|
||||
REQUIRED_USE=^^ ( python_single_target_python3_10 python_single_target_python3_11 )
|
||||
RESTRICT=!test? ( test )
|
||||
SLOT=0
|
||||
SRC_URI=https://github.com/FRRouting/frr/archive/frr-8.5.2.tar.gz
|
||||
_eclasses_=gnuconfig b6b3e92f8b8c996400074b5f61a59256 toolchain-funcs 513c31b3346458ed1f3878b57da6d61c multilib c19072c3cd7ac5cb21de013f7e9832e0 libtool 9d3a9a889a6fa62ae794f817c156491b autotools 6ae9a4347149b19a112caa1182d03bde flag-o-matic ad475baa777c9978fa035216c8264a10 pam 4efe951aa8ce2c16288d7c915196fe29 eapi8-dosym 5ac4857ad078256d939c44f7c64197a9 multiprocessing b4e253ab22cef7b1085e9b67c7a3b730 python-utils-r1 a013e16d5d896b3d8be68dd2a0e846ea python-single-r1 75118e916668a74c660a13b0ecb22562 systemd 5f4bb0758df2e483babf68cd517078ca
|
||||
_md5_=ace2b25e0242784d8c32fddd6590d77a
|
||||
_md5_=3d85fa0df1db0baf5d5bc9c73ed87c54
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -17,7 +17,6 @@ acct-user/rancid 0: User for net-misc/rancid
|
|||
acct-user/routinator 0: User for routinator RPKI validator
|
||||
acct-user/vintagestory 0: User for games-server/vintagestory-server
|
||||
app-admin/gandi-cli 1.6: Command line interface to Gandi.net products using the public API
|
||||
app-misc/live-build 20210407: Debian live system build components
|
||||
app-misc/tmate-ssh-server 2.3.0: tmate SSH server
|
||||
app-text/html2gmi 9999: Command line application to convert HTML to GMI
|
||||
app-text/unicode 2.9: display unicode character properties
|
||||
|
@ -76,7 +75,6 @@ dev-python/django-prometheus 2.2.0: Library to export Django metrics for Prometh
|
|||
dev-python/django-q 1.3.9: A multiprocessing distributed task queue for Django
|
||||
dev-python/django-rq 2.5.1: A simple app that provides django integration for RQ (Redis Queue)
|
||||
dev-python/djangorestframework 3.12.4: Web APIs with django made easy
|
||||
dev-python/dmidecode 0.9.0: dmidecode py
|
||||
dev-python/drf-yasg 1.20.0: Automated generation of real Swagger schemas from Django code
|
||||
dev-python/dublintraceroute 0.4.2: Python bindings for Dublin Traceroute
|
||||
dev-python/elasticsearch-py 7.17.6: Official Python low-level client for Elasticsearch
|
||||
|
@ -114,7 +112,6 @@ dev-python/nwdiag 3.0.0: nwdiag generate network-diagram image file from spec-te
|
|||
dev-python/odfpy 1.4.2: Python API and tools to manipulate OpenDocument files
|
||||
dev-python/peeringdb 1.3.0 1.5.0: PeeringDB python client
|
||||
dev-python/promise 2.3.0: Promises/A+ implementation for Python
|
||||
dev-python/py-dmidecode 0.1.1: python library to parse the output of dmidecode
|
||||
dev-python/pydata-sphinx-theme 0.8.0: Bootstrap-based Sphinx theme from the PyData community
|
||||
dev-python/pyeapi 0.8.4: Python Client for eAPI
|
||||
dev-python/pygal 3.0.0-r2: A python SVG charts generator
|
||||
|
@ -168,7 +165,6 @@ net-analyzer/netsniff-ng 0.6.6 0.6.8: high performance network sniffer for packe
|
|||
net-analyzer/smokeping 2.7.3-r1: A powerful latency measurement tool
|
||||
net-dialup/freeradius 3.2.1: Highly configurable free RADIUS server
|
||||
net-dialup/freeradius-client 1.1.7-r1: FreeRADIUS Client framework
|
||||
net-dialup/ppp 2.4.9-r9: Point-to-Point Protocol (PPP)
|
||||
net-dns/asdig 0.97: Simple client for retrieving AS from IP published via DNS
|
||||
net-dns/dnsperf 2.11.0: DNS Performance Testing Tools
|
||||
net-dns/flamethrower 0.11.0: DNS performance and functional testing utility
|
||||
|
@ -188,7 +184,6 @@ net-libs/ortp 5.1.3: Open Real-time Transport Protocol (RTP, RFC3550) stack
|
|||
net-mail/HyperKitty 1.3.7: A web interface to access GNU Mailman v3 archives
|
||||
net-mail/django-mailman3 1.3.9: Django-based interfaces interacting with Mailman 3
|
||||
net-mail/mailman 3.3.8: Mailman -- the GNU mailing list manager
|
||||
net-mail/mailman-meta 3: Meta ebuild for GNU Mailman 3
|
||||
net-mail/mailman-web 0.0.6: Django project that contains default and url settings for Mailman3 Web Interface
|
||||
net-mail/mailmanclient 3.3.5: Python bindings for the GNU Mailman 3 REST API
|
||||
net-mail/postorius 1.3.8: A web user interface for GNU Mailman 3
|
||||
|
@ -198,7 +193,7 @@ net-misc/bgpdump 1.6.2: Utility and C Library for parsing MRT files
|
|||
net-misc/bgpq4 1.4 1.7: bgp filtering automation tool
|
||||
net-misc/bird 1.6.8 2.0.11 2.13.1 3.0_alpha1: A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 & IPv6
|
||||
net-misc/dhcpd-pools 3.1: ISC dhcpd lease analysis and reporting
|
||||
net-misc/frr 8.4.2 8.5 8.5.2: The FRRouting Protocol Suite
|
||||
net-misc/frr 8.4.2 8.5 8.5.2-r1: The FRRouting Protocol Suite
|
||||
net-misc/ipdecap 0.7.2: Decapsulate traffic encapsulated traffic from a pcap
|
||||
net-misc/ipv6calc 1.0.0 2.1.0 2.1.1 2.2.0 3.0.2 3.1.1 3.2.0 4.0.0 4.0.1 4.0.1-r1: IPv6 address calculator
|
||||
net-misc/irrtoolset 5.1.3: The Internet Routing Registry Toolset
|
||||
|
|
|
@ -0,0 +1,301 @@
|
|||
#!/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}"
|
||||
prlimit -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
|
||||
}
|
|
@ -48,6 +48,7 @@ RDEPEND="
|
|||
${COMMON_DEPEND}
|
||||
$(python_gen_cond_dep 'dev-python/ipaddr[${PYTHON_USEDEP}]')
|
||||
!net-misc/quagga
|
||||
sys-apps/util-linux
|
||||
"
|
||||
|
||||
PATCHES=(
|
|
@ -99,11 +99,6 @@ net-dialup/freeradius:redis - Include support for Redis database
|
|||
net-dialup/freeradius:rest - Include support for sending and receiving HTTP requests
|
||||
net-dialup/freeradius-client:scp - Add service type hints derived from username prefix
|
||||
net-dialup/freeradius-client:shadow - Enable shadow password support
|
||||
net-dialup/ppp:activefilter - Enables active filter support
|
||||
net-dialup/ppp:dhcp - Installs PPP DHCP client plugin for IP address allocation by a DHCP server (see http://www.netservers.co.uk/gpl/)
|
||||
net-dialup/ppp:eap-tls - Enables support for Extensible Authentication Protocol and Transport Level Security (see http://www.nikhef.nl/~janjust/ppp/index.html)
|
||||
net-dialup/ppp:gtk - Installs GTK+ password prompting program that can be used by passprompt.so PPP plugin for reading the password from a X11 input terminal
|
||||
net-dialup/ppp:radius - Enables RADIUS support
|
||||
net-dns/flamethrower:doh - Build DNS-over-HTTPS support
|
||||
net-firewall/ipt_netflow:dot1d - Enable bridge support (to override interfaces)
|
||||
net-firewall/ipt_netflow:dot1q - Enable tagged VLAN support
|
||||
|
|
Loading…
Reference in New Issue