Currently, when installing OpenSSH in a Busybox container, the template searches for all the OpenSSH client binaries available in the Debian distro package. The included tools might differ from distro to distro, so make part of the tools optional. The mandatory tools, without which installing OpenSSH fails, are "sshd" for the server and "ssh" and "scp" for the client.
Signed-off-by: Bogdan Purcareata <bogdan.purcare...@freescale.com> --- templates/lxc-busybox.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index 37ec837..4f27bd8 100644 --- a/templates/lxc-busybox.in +++ b/templates/lxc-busybox.in @@ -205,6 +205,8 @@ install_openssh() client_utils="\ ssh \ scp \ + " + client_optional_utils="\ sftp \ ssh-add \ ssh-agent \ @@ -238,6 +240,13 @@ $rootfs/var/run/sshd \ fi done + for bin in $client_optional_utils; do + tool_path=`which $bin` + if [ $? -eq 0 ]; then + cp $tool_path $rootfs/$tool_path + fi + done + # add user and group cat <<EOF >> $rootfs/etc/passwd sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin -- 2.1.4 _______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel