[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:
parent
8ca1eb289e
commit
503d87b901
10
dockers/docker-lldp-sv2/base_image_files/lldpcli
Normal file
10
dockers/docker-lldp-sv2/base_image_files/lldpcli
Normal 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 "$@"
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user