buildroot/package/frr/S50frr
Vadim Kochan 26d82d006b package/frr: new package
FRR is free software that implements and manages various IPv4 and IPv6
routing protocols. It runs on nearly all distributions of Linux and
BSD as well as Solaris and supports all modern CPU architectures.

FRR currently supports the following protocols:

    BGP
    OSPFv2
    OSPFv3
    RIPv1
    RIPv2
    RIPng
    IS-IS
    PIM-SM/MSDP
    LDP
    BFD
    Babel
    PBR
    OpenFabric
    VRRP
    EIGRP (alpha)
    NHRP (alpha)

Some not-needed features were disabled to minimize package
dependencies:

    - POSIX capabilities
    - RPKi

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
[Thomas:
 - select bash instead of depending on it
 - switch to version 7.4, since 7.3 was not building (it's using
   TRUE/FALSE, which are not standard, and this was fixed in 7.4)
 - use the github macro to define FRR_SITE
 - use host-python3 instead of host-python]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-08-26 23:03:40 +02:00

47 lines
653 B
Bash

#!/bin/sh
DAEMON="frr"
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
start() {
install -m 755 -o frr -g frr -d /var/run/frr
install -m 755 -o frr -g frr -d /var/log/frr
printf 'Starting %s: ' "$DAEMON"
/usr/sbin/frrinit.sh start
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
/usr/sbin/frrinit.sh stop
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start|stop|restart)
"$1";;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac