[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.
This commit is contained in:
yangshiping 2019-09-19 02:39:31 +08:00 committed by lguohan
parent 8ca1eb289e
commit 503d87b901
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#!/bin/bash
DOCKER_EXEC_FLAGS="i"
# Determine whether stdout is on a terminal
if [ -t 1 ] ; then
DOCKER_EXEC_FLAGS+="t"
fi
docker exec -$DOCKER_EXEC_FLAGS lldp lldpcli "$@"

View File

@ -29,3 +29,4 @@ $(DOCKER_LLDP_SV2)_RUN_OPT += --net=host --privileged -t
$(DOCKER_LLDP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro $(DOCKER_LLDP_SV2)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += lldpctl:/usr/bin/lldpctl $(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += lldpctl:/usr/bin/lldpctl
$(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += lldpcli:/usr/bin/lldpcli