diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2017-02-17 08:38:27 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2017-02-17 08:38:27 +0000 |
commit | a34987332d95c4cb8fe04de08ae4d32095220ee5 (patch) | |
tree | d6273b14725a99713808f40653e163bec126d14a | |
parent | 4c2b46f7e3dd1b92932ae04ba815405646ab9bb2 (diff) |
start-container-docker.sh: Add ssh key to root user for test containers.
ABE's test-schroot.sh needs to connect to the 'test' container
as 'root', so add the new temporary key to it too.
Change-Id: Id018d26beeb93a7cd04b82a21fc31be6adbbd723
-rwxr-xr-x | start-container-docker.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/start-container-docker.sh b/start-container-docker.sh index abebcd73..db81395e 100755 --- a/start-container-docker.sh +++ b/start-container-docker.sh @@ -146,6 +146,11 @@ session_port=$($DOCKER port $session_id 22 | cut -d: -f 2) if [ "x`whoami`" = "xtcwg-buildslave" ]; then $DOCKER cp $HOME/.ssh/authorized_keys ${session_id}:/home/tcwg-buildslave/.ssh/authorized_keys + # For 'test' containers, we also need to add the same keys to 'root' + if [ "${task}" = "test" ]; then + $DOCKER cp $HOME/.ssh/authorized_keys ${session_id}:/root/.ssh/authorized_keys + fi + # Start ssh-agent locally and add the right private key to it, but # only if it is not already running. Indeed, even if we want to # start several containers, we need only one ssh-agent. |