diff options
author | David Lamparter <equinox@diac24.net> | 2018-12-10 22:34:49 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-02-19 21:30:54 +0100 |
commit | b3c4c164b5a6652deeddec41502f098846eb63d3 (patch) | |
tree | ff89587c87bee78f9d9281d4148905e678e78fb6 /debian/tests | |
parent | debian: move changelog out of the way (diff) | |
download | frr-b3c4c164b5a6652deeddec41502f098846eb63d3.tar.xz frr-b3c4c164b5a6652deeddec41502f098846eb63d3.zip |
debian: make package "official"
Move us into place in debian/
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'debian/tests')
-rw-r--r-- | debian/tests/control | 3 | ||||
-rw-r--r-- | debian/tests/daemons | 30 |
2 files changed, 33 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 000000000..53fd537e2 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: daemons +Depends: frr +Restrictions: needs-root diff --git a/debian/tests/daemons b/debian/tests/daemons new file mode 100644 index 000000000..43966c834 --- /dev/null +++ b/debian/tests/daemons @@ -0,0 +1,30 @@ +#!/bin/bash +#--------------- +# Testing frr +#--------------- +set -e + +# modify config file to enable all daemons and copy config files +CONFIG_FILE=/etc/frr/daemons +DAEMONS=("zebra" "bgpd" "ospfd" "ospf6d" "ripd" "ripngd" "isisd" "pimd" "fabricd") + +for daemon in "${DAEMONS[@]}" +do + sed -i -e "s/${daemon}=no/${daemon}=yes/g" $CONFIG_FILE + cp /usr/share/doc/frr/examples/${daemon}.conf.sample /etc/frr/${daemon}.conf +done + +# reload frr +/etc/init.d/frr restart > /dev/null 2>&1 + +# check daemons +for daemon in "${DAEMONS[@]}" +do + echo -n "check $daemon - " + if pidof -x $daemon > /dev/null; then + echo "${daemon} OK" + else + echo "ERROR: ${daemon} IS NOT RUNNING" + exit 1 + fi +done |