diff --git a/connect.sh b/connect.sh index feb5d27..9558f6c 100755 --- a/connect.sh +++ b/connect.sh @@ -1,9 +1,8 @@ #! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +DIR="$(dirname "$(realpath -P "${0}")")" if [[ "${-}" =~ "x" ]]; then export INPUT_TRACE=1 fi -docker exec -it \ - -e "INPUT_TRACE=${INPUT_TRACE:-0}" \ - "$(docker ps --filter "label=name=mptcp-upstream-virtme-docker" -l --format "{{.ID}}")" \ - /entrypoint.sh connect "${@}" +bash "-${-}" "${DIR}/container.sh" /entrypoint.sh connect "${@}" diff --git a/container.sh b/container.sh new file mode 100755 index 0000000..33b3011 --- /dev/null +++ b/container.sh @@ -0,0 +1,7 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 + +docker exec -it \ + -e "INPUT_TRACE=${INPUT_TRACE:-0}" \ + "$(docker ps --filter "label=name=mptcp-upstream-virtme-docker" -l --format "{{.ID}}")" \ + "${@:-bash}"