--- frr.in.orig 2019-02-23 18:25:16.009592000 +0000 +++ frr.in 2019-02-23 19:51:47.917449000 +0000 @@ -13,7 +13,7 @@ # You may also wish to use the following variables to fine-tune startup: # frr_flags="" # frr_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd eigrpd babeld bfdd staticd" -# frr_vysh_boot="YES" +# frr_vtysh_boot="YES" # Per daemon tuning may be done with daemon_name_flags # zebra_flags="-P 0" # bgpd_flags="-nrP 0" and so on @@ -92,14 +92,16 @@ frr_cmd=$1 for daemon in ${frr_daemons}; do command=/usr/local/sbin/${daemon} - required_files=/usr/local/etc/frr/${daemon}.conf pidfile=/var/run/frr/${daemon}.pid - if [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ]; then - check_config + if ! checkyesno frr_vtysh_boot; then + required_files=/usr/local/etc/frr/${daemon}.conf + if [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ]; then + check_config + fi + if [ ${frr_cmd} = "start" ] && ! [ -f ${required_files} ]; then + continue + fi fi - if [ ${frr_cmd} = "start" ] && ! [ -f ${required_files} ]; then - continue - fi if [ ${frr_cmd} = "stop" ] && [ -z $(check_process ${command}) ]; then continue fi @@ -108,7 +110,16 @@ _rc_restart_done=false run_rc_command "$1" || ret=1 done - if checkyesno frr_vtysh_boot; then + if checkyesno frr_vtysh_boot && [ ${frr_cmd} = "start" ]; then + echo "Checking intergrated config..." + /usr/local/bin/vtysh -C + result=$? + if [ ${result} -eq "0" ]; then + echo "OK" + else + echo "FAILED" + exit + fi echo "Booting for integrated-vtysh-config..." /usr/local/bin/vtysh -b fi