diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init index cf425e872..a90bf6d0b 100644 --- a/net/keepalived/files/keepalived.init +++ b/net/keepalived/files/keepalived.init @@ -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