Add ping subcommand to batman script

This commit is contained in:
Bob Mottram 2015-08-09 09:54:44 +01:00
parent 2a4519ac5f
commit 82a647779c
2 changed files with 8 additions and 2 deletions

View File

@ -1888,12 +1888,15 @@ function mesh_batman_bridge {
echo ' status)' >> $batman_script echo ' status)' >> $batman_script
echo ' batctl o' >> $batman_script echo ' batctl o' >> $batman_script
echo ' ;;' >> $batman_script echo ' ;;' >> $batman_script
echo ' ping)' >> $batman_script
echo ' batctl ping $2' >> $batman_script
echo ' ;;' >> $batman_script
echo ' ls|list)' >> $batman_script echo ' ls|list)' >> $batman_script
echo ' avahi-browse -at' >> $batman_script echo ' avahi-browse -at' >> $batman_script
echo ' ;;' >> $batman_script echo ' ;;' >> $batman_script
echo ' *)' >> $batman_script echo ' *)' >> $batman_script
echo ' echo "error: invalid parameter $1"' >> $batman_script echo ' echo "error: invalid parameter $1"' >> $batman_script
echo ' echo "usage: $0 {start|stop|restart|status|list|ls}"' >> $batman_script echo ' echo "usage: $0 {start|stop|restart|status|ping|list|ls}"' >> $batman_script
echo ' exit 2' >> $batman_script echo ' exit 2' >> $batman_script
echo ' ;;' >> $batman_script echo ' ;;' >> $batman_script
echo 'esac' >> $batman_script echo 'esac' >> $batman_script

View File

@ -295,12 +295,15 @@ function mesh_batman {
echo ' status)' >> $batman_script echo ' status)' >> $batman_script
echo ' batctl o' >> $batman_script echo ' batctl o' >> $batman_script
echo ' ;;' >> $batman_script echo ' ;;' >> $batman_script
echo ' ping)' >> $batman_script
echo ' batctl ping $2' >> $batman_script
echo ' ;;' >> $batman_script
echo ' ls|list)' >> $batman_script echo ' ls|list)' >> $batman_script
echo ' avahi-browse -at' >> $batman_script echo ' avahi-browse -at' >> $batman_script
echo ' ;;' >> $batman_script echo ' ;;' >> $batman_script
echo ' *)' >> $batman_script echo ' *)' >> $batman_script
echo ' echo "error: invalid parameter $1"' >> $batman_script echo ' echo "error: invalid parameter $1"' >> $batman_script
echo ' echo "usage: $0 {start|stop|restart|status|ls|list}"' >> $batman_script echo ' echo "usage: $0 {start|stop|restart|status|ping|ls|list}"' >> $batman_script
echo ' exit 2' >> $batman_script echo ' exit 2' >> $batman_script
echo ' ;;' >> $batman_script echo ' ;;' >> $batman_script
echo 'esac' >> $batman_script echo 'esac' >> $batman_script