From 46416258bf85d6adac5b31da9af01f43eb3ca35d Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 2 Jul 2012 19:30:12 -0400 Subject: Reject a password containing a single quote (it does weird things in the pkg code), also do not try to query the zebra or ospfd daemon if they are not running. --- config/quagga_ospfd/quaggactl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'config/quagga_ospfd/quaggactl') diff --git a/config/quagga_ospfd/quaggactl b/config/quagga_ospfd/quaggactl index f370b425..6db7232e 100644 --- a/config/quagga_ospfd/quaggactl +++ b/config/quagga_ospfd/quaggactl @@ -28,6 +28,10 @@ restart) $RC_SCRIPT restart ;; zebra) + if [ "`pgrep zebra`" = "" ]; then + echo "zebra does not appear to be running" + exit 1 + fi case $2 in cpu*) daemon_command ${ZEBRA_PORT} ${ZEBRA_PASSWORD} "show thread cpu" @@ -43,7 +47,11 @@ zebra) daemon_command ${ZEBRA_PORT} ${ZEBRA_PASSWORD} "show ip route" ;; esac ;; -ospf) +ospf*) + if [ "`pgrep ospfd`" = "" ]; then + echo "ospfd does not appear to be running" + exit 1 + fi case $2 in cpu*) daemon_command ${OSPF_PORT} ${OSPF_PASSWORD} "show thread cpu" -- cgit v1.2.3