Skip to content

Commit 503d87b

Browse files
yangshp1987lguohan
authored andcommitted
[lldp]: expose lldpcli command of lldp docker to host (#3473)
Lldp can not be configured in host environment, so we expose lldpcli command of lldp docker to host for configuring more convenient.
1 parent 8ca1eb2 commit 503d87b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
DOCKER_EXEC_FLAGS="i"
4+
5+
# Determine whether stdout is on a terminal
6+
if [ -t 1 ] ; then
7+
DOCKER_EXEC_FLAGS+="t"
8+
fi
9+
10+
docker exec -$DOCKER_EXEC_FLAGS lldp lldpcli "$@"

rules/docker-lldp-sv2.mk

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ $(DOCKER_LLDP_SV2)_RUN_OPT += --net=host --privileged -t
2929
$(DOCKER_LLDP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
3030

3131
$(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += lldpctl:/usr/bin/lldpctl
32+
$(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += lldpcli:/usr/bin/lldpcli

0 commit comments

Comments
 (0)