File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,10 @@ remove_p4_telnet() {
193
193
perl -0777 -i -pe ' s/\!\nserver telnet p4\n.*?exit\n\!//s' $SW_FILE
194
194
}
195
195
196
+ fix_interfaces () {
197
+ perl -i.bak -pe ' s/^(proc ifc(\d+)\.sh .+?) eth\d+/\1 eth$2/g unless /^proc ifc255\.sh/' $HW_FILE
198
+ }
199
+
196
200
check_dataplane_type () {
197
201
local boot_config=" $CONF_DIR /.DATAPLANE_TYPE"
198
202
local current_type=" ${DATAPLANE_TYPE} "
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ if [ "$FIRST_BOOT" = "true" ]; then
59
59
if [ ! -f " $HW_FILE " ]; then
60
60
cp $TRG /rtr-hw.txt $HW_FILE
61
61
fi
62
+ fix_interfaces
62
63
chmod u+x $CONF_DIR /hwdet-* .sh
63
64
else
64
65
if [ $DATAPLANE_STATUS_CODE -eq 0 ]; then
68
69
configure_interfaces_mac_sw_file
69
70
delete_p4_server_sw_file
70
71
delete_vrf_p4_sw_file
72
+ fix_interfaces
71
73
elif [ $DATAPLANE_STATUS_CODE -eq 1 ]; then
72
74
echo " changed DATAPLANE_TYPE from pcapInt to p4"
73
75
java -jar $TRG /rtr.jar test hwdet path $CONF_DIR / iface pcap inline exclifc lo/tap20001/sit0/tunl0/eth0/gre0/erspan0/gretap0/ip6tnl0/veth0a/veth0b mem 1024m tcpvrf 2323 OOB 23
76
+ fix_interfaces
74
77
else
75
78
echo " DATAPLANE_TYPE unchanged"
76
79
if [ $NODE_INTFS_STATUS_CODE -eq 1 ] || [ $NODE_INTFS_STATUS_CODE -eq 0 ]; then
79
82
configure_interfaces_mac_sw_file
80
83
delete_p4_server_sw_file
81
84
delete_vrf_p4_sw_file
85
+ fix_interfaces
82
86
fi
83
87
fi
84
88
fi
You can’t perform that action at this time.
0 commit comments