View | Details | Raw Unified | Return to bug 235969 | Differences between
and this patch

Collapse All | Expand All

(-)frr.in (-8 / +19 lines)
Lines 13-19 Link Here
13
# You may also wish to use the following variables to fine-tune startup:
13
# You may also wish to use the following variables to fine-tune startup:
14
#  frr_flags=""
14
#  frr_flags=""
15
#  frr_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd eigrpd babeld bfdd staticd"
15
#  frr_daemons="zebra ripd ripngd ospfd ospf6d bgpd isisd eigrpd babeld bfdd staticd"
16
#  frr_vysh_boot="YES"
16
#  frr_vtysh_boot="YES"
17
# Per daemon tuning may be done with daemon_name_flags
17
# Per daemon tuning may be done with daemon_name_flags
18
#  zebra_flags="-P 0"
18
#  zebra_flags="-P 0"
19
#  bgpd_flags="-nrP 0" and so on
19
#  bgpd_flags="-nrP 0" and so on
Lines 92-105 Link Here
92
	frr_cmd=$1
92
	frr_cmd=$1
93
	for daemon in ${frr_daemons}; do
93
	for daemon in ${frr_daemons}; do
94
	    command=/usr/local/sbin/${daemon}
94
	    command=/usr/local/sbin/${daemon}
95
	    required_files=/usr/local/etc/frr/${daemon}.conf
96
	    pidfile=/var/run/frr/${daemon}.pid
95
	    pidfile=/var/run/frr/${daemon}.pid
97
	    if [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ]; then
96
	    if ! checkyesno frr_vtysh_boot; then
98
		check_config
97
	    	required_files=/usr/local/etc/frr/${daemon}.conf
98
		if [ ${frr_cmd} = "restart" ] || [ ${frr_cmd} = "start" ]; then
99
		    check_config
100
		fi
101
		if [ ${frr_cmd} = "start" ] && ! [ -f ${required_files} ]; then
102
		    continue
103
		fi
99
	    fi
104
	    fi
100
	    if [ ${frr_cmd} = "start" ] && ! [ -f ${required_files} ]; then
101
			continue
102
	    fi
103
	    if [ ${frr_cmd} = "stop" ] && [ -z $(check_process ${command}) ]; then
105
	    if [ ${frr_cmd} = "stop" ] && [ -z $(check_process ${command}) ]; then
104
			continue
106
			continue
105
	    fi
107
	    fi
Lines 108-114 Link Here
108
	    _rc_restart_done=false
110
	    _rc_restart_done=false
109
	    run_rc_command "$1" || ret=1
111
	    run_rc_command "$1" || ret=1
110
	done
112
	done
111
	if checkyesno frr_vtysh_boot; then
113
	if checkyesno frr_vtysh_boot && [ ${frr_cmd} = "start" ]; then
114
	    echo "Checking intergrated config..."
115
	    /usr/local/bin/vtysh -C
116
	    result=$?
117
	    if [ ${result} -eq "0" ]; then
118
	        echo "OK"
119
	    else
120
		echo "FAILED"
121
		exit
122
	    fi
112
	    echo "Booting for integrated-vtysh-config..."
123
	    echo "Booting for integrated-vtysh-config..."
113
	    /usr/local/bin/vtysh -b
124
	    /usr/local/bin/vtysh -b
114
	fi
125
	fi

Return to bug 235969