]> git.proxmox.com Git - mirror_frr.git/blobdiff - tools/frr
Merge remote-tracking branch 'origin/master' into datacenter
[mirror_frr.git] / tools / frr
index 2ecaadbb5382a848edd438b3d5896bebc1ee683e..6f00700e4073d8cdf749287d4941a13d13fbf539 100755 (executable)
--- a/tools/frr
+++ b/tools/frr
@@ -21,7 +21,7 @@ V_PATH=/var/run/frr
 # Local Daemon selection may be done by using /etc/frr/daemons.
 # See /usr/share/doc/frr/README.Debian.gz for further information.
 # Keep zebra first and do not list watchfrr!
-DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd"
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld pimd ldpd nhrpd eigrpd"
 MAX_INSTANCES=5
 RELOAD_SCRIPT=/usr/lib/frr/frr-reload.py
 
@@ -61,7 +61,7 @@ started()
 vtysh_b ()
 {
         # Rember, that all variables have been incremented by 1 in convert_daemon_prios()
-        if [ "$vtysh_enable" = 2 -a -f $C_PATH/Frr.conf ]; then
+        if [ "$vtysh_enable" = 2 -a -f $C_PATH/frr.conf ]; then
                 /usr/bin/vtysh -b -n
         fi
 }
@@ -73,7 +73,7 @@ vtysh_b ()
 check_daemon()
 {
         # If the integrated config file is used the others are not checked.
-        if [ -r "$C_PATH/Frr.conf" ]; then
+        if [ -r "$C_PATH/frr.conf" ]; then
           return 0
         fi
 
@@ -150,12 +150,21 @@ start()
                return;
            fi
 
-           ${SSD} \
+           if [ $valgrind_enable = "yes" ]; then
+              ${SSD} \
+               --start \
+               --pidfile=`pidfile $1` \
+               --exec $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
 }
 
@@ -476,7 +485,7 @@ check_status()
 
 # Load configuration
 . "$C_PATH/daemons"
-. "$C_PATH/debian.conf"
+. "$C_PATH/daemons.conf"
 
 # Read configuration variable file if it is present
 [ -r /etc/default/frr ] && . /etc/default/frr
@@ -532,8 +541,15 @@ case "$1" in
         fi
 
         if [ -z "$dmn" -o "$dmn" = "zebra" ]; then
-          echo "Removing all routes made by zebra."
+          echo "Removing all routes made by FRR."
+          ip route flush proto bgp
+          ip route flush proto ospf
+          ip route flush proto static
+          ip route flush proto rip
+          ip route flush proto ripng
           ip route flush proto zebra
+          ip route flush proto isis
+
        else
          [ -n "$dmn" ] && eval "${dmn/-/_}=0"
          start_watchfrr
@@ -543,10 +559,10 @@ case "$1" in
     reload)
        # Just apply the commands that have changed, no restart necessary
        [ ! -x "$RELOAD_SCRIPT" ] && echo "frr-reload script not available" && exit 0
-       NEW_CONFIG_FILE="${2:-$C_PATH/Frr.conf}"
+       NEW_CONFIG_FILE="${2:-$C_PATH/frr.conf}"
        [ ! -r $NEW_CONFIG_FILE ] && echo "Unable to read new configuration file $NEW_CONFIG_FILE" && exit 1
-       echo "Applying only incremental changes to running configuration from Frr.conf"
-       "$RELOAD_SCRIPT" --reload /etc/frr/Frr.conf
+       echo "Applying only incremental changes to running configuration from frr.conf"
+       "$RELOAD_SCRIPT" --reload /etc/frr/frr.conf
        exit $?
        ;;