keepalived: move alt_config_file check into process_config
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
9b24763b9f
commit
c4d1af42e8
|
@ -95,12 +95,9 @@ print_notify() {
|
|||
done
|
||||
}
|
||||
|
||||
global_defs() {
|
||||
globals() {
|
||||
local linkbeat_use_polling notification_email
|
||||
|
||||
config_get alt_config_file "$1" alt_config_file
|
||||
[ -z "$alt_config_file" ] || return 0
|
||||
|
||||
config_get_bool linkbeat_use_polling "$1" linkbeat_use_polling 0
|
||||
[ "$linkbeat_use_polling" -gt 0 ] && printf 'linkbeat_use_polling\n\n' >> "$KEEPALIVED_CONF"
|
||||
|
||||
|
@ -494,10 +491,7 @@ process_config() {
|
|||
|
||||
[ -f /etc/config/keepalived ] || return 0
|
||||
config_load 'keepalived'
|
||||
|
||||
config_section_open "global_defs"
|
||||
config_foreach_wrapper global_defs
|
||||
config_section_close
|
||||
config_get alt_config_file globals alt_config_file
|
||||
|
||||
# If "alt_config_file" specified, use that instead
|
||||
[ -n "$alt_config_file" ] && [ -f "$alt_config_file" ] && {
|
||||
|
@ -507,6 +501,10 @@ process_config() {
|
|||
return 0
|
||||
}
|
||||
|
||||
config_section_open "global_defs"
|
||||
config_foreach_wrapper globals
|
||||
config_section_close
|
||||
|
||||
config_section_open "static_ipaddress"
|
||||
config_foreach_wrapper static_ipaddress
|
||||
config_section_close
|
||||
|
|
Loading…
Reference in New Issue