Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This allows you to start all daemons via valgrind so you can catch
memory leaks, etc.
# Check /etc/pam.d/frr if you intend to use "vtysh"!
#
vtysh_enable=yes
+valgrind_enable=no
zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
bgpd_options=" --daemon -A 127.0.0.1"
ospfd_options=" --daemon -A 127.0.0.1"
return;
fi
- ${SSD} \
+ if [ $valgrind_enable = "yes" ]; then
+ ${SSD} \
+ --start \
+ --pidfile=`pidfile $1` \
+ --exec "/usr/bin/valgrind" \
+ -- --trace-children=no --leak-check=full --log-file=/var/log/frr/$1-valgrind.log $D_PATH/$1 \
+ `eval echo "$""$1""_options"`
+ else
+ ${SSD} \
--start \
--pidfile=`pidfile $1` \
--exec "$D_PATH/$1" \
-- \
`eval echo "$""$1""_options"`
+ fi
fi
}