This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/dockers/docker-fpm-quagga/base_image_files/vtysh
Qi Luo 658ed4fd37
Revert "Remove quagga related code (#7476)" (#7831)
Reverts Azure/sonic-buildimage#7476
It remove bgpd.conf.j2 and zebra.conf.j2, which is still used by sonic-config-engine unit test.
2021-06-09 18:52:45 -07:00

17 lines
401 B
Bash
Executable File

#!/bin/bash
# Determine whether stdout is on a terminal
if [ -t 1 ] ; then
# Prepare a function to send HUP signal to vtysh in the container
# we mark the new instance of vtysh with the current tty as a tag
TTY=$(tty)
function cleanup
{
docker exec -i bgp pkill -HUP -f "vtysh $TTY"
}
trap cleanup HUP
docker exec -ti bgp vtysh "$TTY" "$@"
else
docker exec -i bgp vtysh "$@"
fi