[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
This commit is contained in:
parent
724aaf162c
commit
f3f8b9ff57
@ -31,6 +31,9 @@ RUN apt-get -y install \
|
||||
python \
|
||||
less
|
||||
|
||||
# Pre-install troubleshooting packages
|
||||
RUN apt-get -y install socat
|
||||
|
||||
COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"]
|
||||
COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"]
|
||||
COPY ["root/.vimrc", "/root/.vimrc"]
|
||||
|
@ -19,7 +19,7 @@ debs/{{ deb }}{{' '}}
|
||||
## TODO: add kmod into Depends
|
||||
RUN apt-get install -f kmod
|
||||
|
||||
COPY ["files/dsserve", "files/bcmcmd", "start.sh", "/usr/bin/"]
|
||||
COPY ["files/dsserve", "files/bcmcmd", "start.sh", "bcmsh", "/usr/bin/"]
|
||||
RUN chmod +x /usr/bin/dsserve /usr/bin/bcmcmd
|
||||
|
||||
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
|
3
platform/broadcom/docker-syncd-brcm/base_image_files/bcmsh
Executable file
3
platform/broadcom/docker-syncd-brcm/base_image_files/bcmsh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -i syncd bcmsh "$@"
|
35
platform/broadcom/docker-syncd-brcm/bcmsh
Executable file
35
platform/broadcom/docker-syncd-brcm/bcmsh
Executable file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user