diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2018-06-18 15:32:25 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2018-06-18 20:10:15 +0000 |
commit | f936c40bc960faeac427f1936b9ee25ccbcf9315 (patch) | |
tree | 32ba6b1f89d8dddb9135c003a7c4d7c1b2ff4f15 /start-container-docker.sh | |
parent | 2e83728051d51ac55b1a3bba329f0ad23551b888 (diff) |
start-container-docker.sh: Remove unnecessary option.
We now have "--newuser user" option fetch proper ssh keys from home-data/.
Change-Id: I771f72e7b0beae1f6a3c0f7ce08c522aeb53cc0b
Diffstat (limited to 'start-container-docker.sh')
-rwxr-xr-x | start-container-docker.sh | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/start-container-docker.sh b/start-container-docker.sh index b71e5ea1..e17279b5 100755 --- a/start-container-docker.sh +++ b/start-container-docker.sh @@ -15,7 +15,7 @@ set -e # - definition of ${session_host} and ${session_port}, can be used for # a remote connexion to the container usage() { - echo "Usage: $0 [--arch container-arch] [--cp_file from[:to:owner:perms]] --distro flavour [--docker_opts opts] [--dryrun true/false] [--label label] [--newuser username:[uid]] [--node node] [--prefix prefix] [--session-host host] [--session-name name] [--task {build|test}] [--user user] [--weight weight]" + echo "Usage: $0 [--arch container-arch] --distro flavour [--docker_opts opts] [--dryrun true/false] [--label label] [--newuser username:[uid]] [--node node] [--prefix prefix] [--session-host host] [--session-name name] [--task {build|test}] [--user user] [--weight weight]" echo echo " container-arch: architecture (eg: amd64, i386, arm64, armhf)" echo " distro: distribution (eg: trusty)" @@ -40,7 +40,6 @@ exec 3>&1 4>&2 exec 1>&2 container_arch="default" -cp_files=() distro="default" docker_opts= dryrun=false @@ -62,11 +61,6 @@ do [ x${container_arch} = x ] && usage shift 2 ;; - --cp_file) - cp_files=("${cp_files[@]}" "$2") - [ x$2 = x ] && usage - shift 2 - ;; --distro) distro=$2 [ x${distro} = x ] && usage @@ -253,27 +247,6 @@ if [ x"$newuser" != x"" ]; then $DOCKER exec "$session_id" new-user.sh --user $newuser fi -for cp_file in "${cp_files[@]}"; do - from=$(echo "$cp_file" | cut -d: -f 1) - to=$(echo "$cp_file" | cut -s -d: -f 2) - owner=$(echo "$cp_file" | cut -s -d: -f 3) - perms=$(echo "$cp_file" | cut -s -d: -f 4) - - if [ x"$to" = x"" ]; then - to="$from" - fi - - $DOCKER cp "$from" "$session_id:$to" - - if [ x"$owner" != x"" ]; then - $DOCKER exec "$session_id" chown "$owner" "$to" - fi - - if [ x"$perms" != x"" ]; then - $DOCKER exec "$session_id" chmod "$perms" "$to" - fi -done - session_port=$($DOCKER port $session_id 22 | cut -d: -f 2) # Wait until the ssh server is ready to serve connexions |