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'
- # Delete all GW rules
- sshgw 'eval $(cangw -L|sed -e s/-A/-D/ -e "s/#.*/;/")'
+ sshgw 'cangw -F'
}
_plot() {
dir=$(create_dirs_and_links $(basename $0 .sh) $kvers)
script=$PWD/$0
cd $dir
+ echo "Working directory: $dir"
if [[ ! "$OPT_PLOT_ONLY" ]]; then
+ rm -rf *
cleanupgw
main
cp $script .