Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
adam committed Mar 9, 2006
1 parent 57b0e5f commit b7b6e10
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/pinggw
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

gateway=$( route -n | awk '/^0\.0\.0\.0[^0-9]/ {print $2; exit}' )

if [ -z "$gateway" ]; then
echo "Could not find default route via route -n:" >&2
route -n >&2
exit 1
fi

ping "$@" "$gateway"

0 comments on commit b7b6e10

Please sign in to comment.