Skip to content

Commit

Permalink
Add is_connected facility.
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Feb 19, 2017
1 parent 361ccb5 commit 40bece6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gobonet
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ function show_help() {
echo " Print detected WiFi interface"
echo " gobonet wired_interface"
echo " Print detected wired interface"
echo " gobonet is_connected <interface>"
echo " Exit status indicates if interface is connected"
echo ""
exit 0
}
Expand Down Expand Up @@ -333,6 +335,11 @@ case "$1" in
[ "$wired_interface" != "" ]
exit $?
;;
is_connected)
[ "$2" = "" ] && usage "is_connected <interface>"
is_connected "$2"
exit $?
;;
autoconnect)
[ "$2" = "" ] || usage "autoconnect"
autoconnect
Expand Down

0 comments on commit 40bece6

Please sign in to comment.