Commit 4432b512 by Bogdan Purcareata Committed by Stéphane Graber

lxc-busybox: make some OpenSSH tools optional

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: 's avatarBogdan Purcareata <bogdan.purcareata@freescale.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 5a56eeb6
...@@ -197,6 +197,8 @@ install_openssh() ...@@ -197,6 +197,8 @@ install_openssh()
client_utils="\ client_utils="\
ssh \ ssh \
scp \ scp \
"
client_optional_utils="\
sftp \ sftp \
ssh-add \ ssh-add \
ssh-agent \ ssh-agent \
...@@ -230,6 +232,13 @@ $rootfs/var/run/sshd \ ...@@ -230,6 +232,13 @@ $rootfs/var/run/sshd \
fi fi
done 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 # add user and group
cat <<EOF >> $rootfs/etc/passwd cat <<EOF >> $rootfs/etc/passwd
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment