File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
platform/broadcom/docker-syncd-brcm Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2- usage=" $( basename " $0 " ) [-h] [-q] -- interactive shell for bcm service
2+ usage=" $( basename " $0 " ) [-h] [-q] [-t timeout] -- interactive shell for bcm service
33
44where:
55 -h show this help text
6+ -t inactivity timeout in seconds (default 300 seconds, 0 for no timeout)
67 -q quite, no banner (default: verbose)"
78
89banner=" Press Enter to show prompt.
910Press Ctrl+C to exit.
11+ NOTICE: Only one bcmsh or bcmcmd can connect to the shell at same time.
1012"
1113
1214# Default verbose
1315quiet=false
16+ timeout=300
1417
15- while getopts ' hq ' option; do
18+ while getopts ' hqt: ' option; do
1619 case " $option " in
1720 h) echo " $usage "
1821 exit
1922 ;;
2023 q) quiet=true
2124 ;;
25+ t) timeout=$OPTARG
26+ ;;
2227 \? ) printf " illegal option: -%s\n" " $OPTARG " >&2
2328 echo " $usage " >&2
2429 exit 1
@@ -31,5 +36,5 @@ if [ "$quiet" = false ]; then
3136 echo " $banner "
3237fi
3338
34- /usr/bin/socat readline UNIX-CONNECT:/var/run/sswsyncd/sswsyncd.socket
39+ /usr/bin/socat -T $timeout readline UNIX-CONNECT:/var/run/sswsyncd/sswsyncd.socket
3540
You can’t perform that action at this time.
0 commit comments