]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools/frr.in: Only attempt to load daemons.conf if present 4020/head
authorChristian Franke <chris@opensourcerouting.org>
Tue, 26 Mar 2019 09:28:09 +0000 (10:28 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Tue, 26 Mar 2019 09:33:45 +0000 (10:33 +0100)
Apparently, the default changed to use `/etc/frr/daemons` instead of
`/etc/frr/daemons.conf`. Therefore, we should ignore absence of the
latter file, because its absence is not an actuall error but will
cause a confusing error message like this:

    /etc/init.d/frr: line 507: /etc/frr/daemons.conf: No such file or directory

tools/frr.in

index a443191fd04122893ee200870f22b4f16440220b..2e3a094589cb4eb738f8bf1c24a75be31f47647c 100755 (executable)
@@ -504,7 +504,9 @@ check_status()
 
 # Load configuration
 . "$C_PATH/daemons"
-. "$C_PATH/daemons.conf"
+if [ -e "$C_PATH/daemons.conf" ]; then
+       . "$C_PATH/daemons.conf"
+fi
 
 # Read configuration variable file if it is present
 [ -r /etc/default/frr ] && . /etc/default/frr