}
cleanupgw() {
- # Set can interfaces up
- sshgw 'for i in 0 1; do ip link show dev can$i|grep -q UP || ip link set can$i up type can bitrate 1000000; done'
sshgw 'cangw -F'
}
cd $dir
echo "Working directory: $dir"
if [[ ! "$OPT_PLOT_ONLY" ]]; then
+ # Remove data from the last measurement
rm -rf *
+ # Set can interfaces up
+ sshgw 'for i in 0 1; do ip link show dev can$i|grep -q UP || ip link set can$i up type can bitrate 1000000; done'
+ # Delete all vcan interfaces
+ sshgw 'for dev in $(ip l|grep -o vcan[^:]\\+); do ip link del dev $dev; done'
cleanupgw
+
main
cp $script .
fi