Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sonic_extension]: Add shell scripts in host FS to call executables inside dockers #372

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ sudo dpkg --root=$FILESYSTEM_ROOT -P {{ debname }}

sudo rm -f $FILESYSTEM_ROOT/usr/sbin/policy-rc.d

# Copy shell scripts which reference executables inside dockers
if [ $sonic_asic_platform == "broadcom" ]; then
sudo cp -f $IMAGE_CONFIGS/bin/bcmcmd $FILESYSTEM_ROOT/usr/bin
fi
sudo cp -f $IMAGE_CONFIGS/bin/redis-cli $FILESYSTEM_ROOT/usr/bin
sudo cp -f $IMAGE_CONFIGS/bin/teamdctl $FILESYSTEM_ROOT/usr/bin
sudo cp -f $IMAGE_CONFIGS/bin/vtysh $FILESYSTEM_ROOT/usr/bin

## copy platform rc.local
sudo cp $IMAGE_CONFIGS/platform/rc.local $FILESYSTEM_ROOT/etc/

Expand Down
3 changes: 3 additions & 0 deletions files/image_config/bin/bcmcmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker exec -i syncd bcmcmd "$@"
3 changes: 3 additions & 0 deletions files/image_config/bin/redis-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker exec -it database redis-cli "$@"
3 changes: 3 additions & 0 deletions files/image_config/bin/teamdctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker exec -i teamd teamdctl "$@"
3 changes: 3 additions & 0 deletions files/image_config/bin/vtysh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker exec -i bgp vtysh "$@"