-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[syncd]: Add socat and bcmsh wrapper (#1657)
* [syncd]: Add socat and bcmsh wrapper * Install socat in docker-base * Add hint banner, add host wrapper * Refine banner message
- Loading branch information
1 parent
724aaf1
commit f3f8b9f
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
docker exec -i syncd bcmsh "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
usage="$(basename "$0") [-h] [-q] -- interactive shell for bcm service | ||
where: | ||
-h show this help text | ||
-q quite, no banner (default: verbose)" | ||
|
||
banner="Press Enter to show prompt. | ||
Press Ctrl+C to exit. | ||
" | ||
|
||
# Default verbose | ||
quiet=false | ||
|
||
while getopts 'hq' option; do | ||
case "$option" in | ||
h) echo "$usage" | ||
exit | ||
;; | ||
q) quiet=true | ||
;; | ||
\?) printf "illegal option: -%s\n" "$OPTARG" >&2 | ||
echo "$usage" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
shift $((OPTIND - 1)) | ||
|
||
if [ "$quiet" = false ]; then | ||
echo "$banner" | ||
fi | ||
|
||
/usr/bin/socat - UNIX-CONNECT:/var/run/sswsyncd/sswsyncd.socket | ||
|