bird1: rename get_bool() to get_a_bool() in bird{4,6}-lib.sh
[feed/routing.git] / bird1-openwrt / bird1-ipv6-openwrt / src / init.d / bird6-lib.sh
index 7d298105b38904febaf067ba15443362081a5779..7a4b00f702b80391706827a156921292758191b7 100644 (file)
@@ -57,12 +57,15 @@ get() {
 }
 
 
-# Function: get_bool $1 $2
+# Function: get_a_bool $1 $2
 # $1 boolean. $2 string
 # This function uses the external UCI function "config_get_bool $result $section $option" to obtain a boolean value from UCI config file.
 # To use this function, use the same name of the UCI option for the variable $1.
 # Example: UCI (option use_ipv6 '1'); local use_ipv6; get use_ipv6 $section
-get_bool() {
+# Note: this function was originally called get_bool(), but it collided with
+#       the get_bool() function provided by /lib/functions.sh. Read more at
+#       https://github.com/openwrt/routing/issues/920.
+get_a_bool() {
     config_get_bool $1 $2 $1
 }
 
@@ -195,7 +198,7 @@ prepare_kernel() {
     local disabled; local table; local kernel_table; local import; local export
     local scan_time; local persist; local learn
 
-    get_bool disabled ${section}
+    get_a_bool disabled ${section}
     get table ${section}
     get import ${section}
     get export ${section}
@@ -322,9 +325,9 @@ prepare_bgp_template() {
     local import_limit; local import_limit_action; local export_limit; local export_limit_action
     local receive_limit; local receive_limit_action; local igp_table
 
-    get_bool disabled ${section}
-    get_bool next_hop_self ${section}
-    get_bool next_hop_keep ${section}
+    get_a_bool disabled ${section}
+    get_a_bool next_hop_self ${section}
+    get_a_bool next_hop_keep ${section}
     get table ${section}
     get import ${section}
     get export ${section}