[commits] [openwrt-feed-devel] master: batman-adv-devel: Switch proto scripts to new prefixes (5b65c88)

postmaster at open-mesh.org postmaster at open-mesh.org
Thu Aug 1 16:55:20 CEST 2019


Repository : ssh://git@open-mesh.org/openwrt-feed-devel

On branch  : master

>---------------------------------------------------------------

commit 5b65c88e9cb867b40df854c7f98f9c2853eb5273
Author: Sven Eckelmann <sven at narfation.org>
Date:   Thu Aug 1 16:22:00 2019 +0200

    batman-adv-devel: Switch proto scripts to new prefixes
    
    The '-m' option to select the mesh interface or vlan interfaces was
    replaced with device type specific subcommand prefixes:
    
    * meshif <netdev>
    * vlan <vdev>
    * meshif <netdev> vid <vid>
    * hardif <netdev>
    
    This change should also be made in the proto script to allow batctl to drop
    the support of '-m' completely in the future.
    
    Signed-off-by: Sven Eckelmann <sven at narfation.org>


>---------------------------------------------------------------

5b65c88e9cb867b40df854c7f98f9c2853eb5273
 batman-adv-devel/files/lib/netifd/proto/batadv.sh  | 40 +++++++++++-----------
 .../files/lib/netifd/proto/batadv_hardif.sh        |  8 ++---
 .../files/lib/netifd/proto/batadv_vlan.sh          |  2 +-
 3 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/batman-adv-devel/files/lib/netifd/proto/batadv.sh b/batman-adv-devel/files/lib/netifd/proto/batadv.sh
index a7fe63c..edc14f4 100755
--- a/batman-adv-devel/files/lib/netifd/proto/batadv.sh
+++ b/batman-adv-devel/files/lib/netifd/proto/batadv.sh
@@ -72,42 +72,42 @@ proto_batadv_setup() {
 	set_default routing_algo 'BATMAN_IV'
 
 	batctl routing_algo "$routing_algo"
-	batctl -m "$iface" interface create
+	batctl meshif "$iface" interface create
 
-	[ -n "$aggregated_ogms" ] && batctl -m "$iface" aggregation "$aggregated_ogms"
-	[ -n "$ap_isolation" ] && batctl -m "$iface" ap_isolation "$ap_isolation"
-	[ -n "$bonding" ] && batctl -m "$iface" bonding "$bonding"
-	[ -n "$bridge_loop_avoidance" ] &&  batctl -m "$iface" bridge_loop_avoidance "$bridge_loop_avoidance" 2>&-
-	[ -n "$distributed_arp_table" ] && batctl -m "$iface" distributed_arp_table "$distributed_arp_table" 2>&-
-	[ -n "$fragmentation" ] && batctl -m "$iface" fragmentation "$fragmentation"
+	[ -n "$aggregated_ogms" ] && batctl meshif "$iface" aggregation "$aggregated_ogms"
+	[ -n "$ap_isolation" ] && batctl meshif "$iface" ap_isolation "$ap_isolation"
+	[ -n "$bonding" ] && batctl meshif "$iface" bonding "$bonding"
+	[ -n "$bridge_loop_avoidance" ] &&  batctl meshif "$iface" bridge_loop_avoidance "$bridge_loop_avoidance" 2>&-
+	[ -n "$distributed_arp_table" ] && batctl meshif "$iface" distributed_arp_table "$distributed_arp_table" 2>&-
+	[ -n "$fragmentation" ] && batctl meshif "$iface" fragmentation "$fragmentation"
 
 	case "$gw_mode" in
 	server)
 		if [ -n "$gw_bandwidth" ]; then
-			batctl -m "$iface" gw_mode "server" "$gw_bandwidth"
+			batctl meshif "$iface" gw_mode "server" "$gw_bandwidth"
 		else
-			batctl -m "$iface" gw_mode "server"
+			batctl meshif "$iface" gw_mode "server"
 		fi
 		;;
 	client)
 		if [ -n "$gw_sel_class" ]; then
-			batctl -m "$iface" gw_mode "client" "$gw_sel_class"
+			batctl meshif "$iface" gw_mode "client" "$gw_sel_class"
 		else
-			batctl -m "$iface" gw_mode "client"
+			batctl meshif "$iface" gw_mode "client"
 		fi
 		;;
 	*)
-		batctl -m "$iface" gw_mode "off"
+		batctl meshif "$iface" gw_mode "off"
 		;;
 	esac
 
-	[ -n "$hop_penalty" ] && batctl -m "$iface" hop_penalty "$hop_penalty"
-	[ -n "$isolation_mark" ] && batctl -m "$iface" isolation_mark "$isolation_mark"
-	[ -n "$multicast_fanout" ] && batctl -m "$iface" multicast_fanout "$multicast_fanout"
-	[ -n "$multicast_mode" ] && batctl -m "$iface" multicast_mode "$multicast_mode" 2>&-
-	[ -n "$network_coding" ] && batctl -m "$iface" network_coding "$network_coding" 2>&-
-	[ -n "$log_level" ] && batctl -m "$iface" loglevel "$log_level" 2>&-
-	[ -n "$orig_interval" ] && batctl -m "$iface" orig_interval "$orig_interval"
+	[ -n "$hop_penalty" ] && batctl meshif "$iface" hop_penalty "$hop_penalty"
+	[ -n "$isolation_mark" ] && batctl meshif "$iface" isolation_mark "$isolation_mark"
+	[ -n "$multicast_fanout" ] && batctl meshif "$iface" multicast_fanout "$multicast_fanout"
+	[ -n "$multicast_mode" ] && batctl meshif "$iface" multicast_mode "$multicast_mode" 2>&-
+	[ -n "$network_coding" ] && batctl meshif "$iface" network_coding "$network_coding" 2>&-
+	[ -n "$log_level" ] && batctl meshif "$iface" loglevel "$log_level" 2>&-
+	[ -n "$orig_interval" ] && batctl meshif "$iface" orig_interval "$orig_interval"
 
 	proto_init_update "$iface" 1
 	proto_send_update "$config"
@@ -117,7 +117,7 @@ proto_batadv_teardown() {
 	local config="$1"
 	local iface="$config"
 
-	batctl -m "$iface" interface destroy
+	batctl meshif "$iface" interface destroy
 }
 
 add_protocol batadv
diff --git a/batman-adv-devel/files/lib/netifd/proto/batadv_hardif.sh b/batman-adv-devel/files/lib/netifd/proto/batadv_hardif.sh
index 76ccd81..6eb597f 100755
--- a/batman-adv-devel/files/lib/netifd/proto/batadv_hardif.sh
+++ b/batman-adv-devel/files/lib/netifd/proto/batadv_hardif.sh
@@ -26,10 +26,10 @@ proto_batadv_hardif_setup() {
 
 	( proto_add_host_dependency "$config" '' "$master" )
 
-	batctl -m "$master" interface -M add "$iface"
+	batctl meshif "$master" interface -M add "$iface"
 
-	[ -n "$elp_interval" ] && batctl -m "$master" hardif "$iface" elp_interval "$elp_interval"
-	[ -n "$throughput_override" ] && batctl -m "$master" hardif "$iface" throughput_override "$throughput_override"
+	[ -n "$elp_interval" ] && batctl hardif "$iface" elp_interval "$elp_interval"
+	[ -n "$throughput_override" ] && batctl hardif "$iface" throughput_override "$throughput_override"
 
 	proto_init_update "$iface" 1
 	proto_send_update "$config"
@@ -43,7 +43,7 @@ proto_batadv_hardif_teardown() {
 
 	json_get_vars master
 
-	batctl -m "$master" interface -M del "$iface" || true
+	batctl meshif "$master" interface -M del "$iface" || true
 }
 
 add_protocol batadv_hardif
diff --git a/batman-adv-devel/files/lib/netifd/proto/batadv_vlan.sh b/batman-adv-devel/files/lib/netifd/proto/batadv_vlan.sh
index b4835f6..115e61c 100755
--- a/batman-adv-devel/files/lib/netifd/proto/batadv_vlan.sh
+++ b/batman-adv-devel/files/lib/netifd/proto/batadv_vlan.sh
@@ -17,7 +17,7 @@ proto_batadv_vlan_setup() {
 
 	json_get_vars ap_isolation
 
-	[ -n "$ap_isolation" ] && batctl -m "$iface" ap_isolation "$ap_isolation"
+	[ -n "$ap_isolation" ] && batctl vlan "$iface" ap_isolation "$ap_isolation"
 	proto_init_update "$iface" 1
 	proto_send_update "$config"
 }



More information about the commits mailing list