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"
[ -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" ] && {
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