Skip to content

Commit

Permalink
[lldp]: expose lldpcli command of lldp docker to host (#3473)
Browse files Browse the repository at this point in the history
Lldp can not be configured in host environment, so we expose lldpcli command of lldp docker to host for configuring more convenient.
  • Loading branch information
yangshp1987 authored and lguohan committed Sep 18, 2019
1 parent 8ca1eb2 commit 503d87b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dockers/docker-lldp-sv2/base_image_files/lldpcli
Original file line number Diff line number Diff line change
@@ -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 "$@"
1 change: 1 addition & 0 deletions rules/docker-lldp-sv2.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)_BASE_IMAGE_FILES += lldpctl:/usr/bin/lldpctl
$(DOCKER_LLDP_SV2)_BASE_IMAGE_FILES += lldpcli:/usr/bin/lldpcli

0 comments on commit 503d87b

Please sign in to comment.