keepalived: move linkbeat_use_polling section into main section
authorFlorian Eckert <fe@dev.tdt.de>
Wed, 29 Apr 2020 17:38:00 +0000 (19:38 +0200)
committerFlorian Eckert <Eckert.Florian@googlemail.com>
Mon, 4 May 2020 07:07:00 +0000 (09:07 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/keepalived/files/keepalived.init

index a90bf6d0b126a416139889db84a693aa7285869c..05c47bb36909f2f5d9b3062db7868fb0fcc9e800 100644 (file)
@@ -96,10 +96,7 @@ print_notify() {
 }
 
 globals() {
-       local linkbeat_use_polling notification_email
-
-       config_get_bool linkbeat_use_polling "$1" linkbeat_use_polling 0
-       [ "$linkbeat_use_polling" -gt 0 ] && printf 'linkbeat_use_polling\n\n' >> "$KEEPALIVED_CONF"
+       local notification_email
 
        config_get notification_email "$1" notification_email
        print_list_indent notification_email
@@ -481,7 +478,7 @@ virtual_server() {
 }
 
 process_config() {
-       local alt_config_file
+       local alt_config_file linkbeat_use_polling
 
        rm -f "$KEEPALIVED_CONF"
 
@@ -501,6 +498,9 @@ process_config() {
                return 0
        }
 
+       config_get_bool linkbeat_use_polling globals linkbeat_use_polling 0
+       [ "$linkbeat_use_polling" -gt 0 ] && printf 'linkbeat_use_polling\n\n' >> "$KEEPALIVED_CONF"
+
        config_section_open "global_defs"
        config_foreach_wrapper globals
        config_section_close