Create RSA host key in user specified path

On each ssh connection, we are getting a Warning message similar to below:

dropbear[3956]: Failed loading /var/lib/dropbear/dropbear_rsa_host_key

This is because the dropbear service is started with the -r option which
points to /var/lib/dropbear/dropbear_rsa_host_key as the RSA host key to
load.  However, the dropbearkey.service creates the key in /etc/dropbear
instead.  There is an environment file, /etc/default/dropbear, which
contains the path to the RSA host key.  This path is set by
rootfs-postcommands.bbclass.  At build time, the .bbclass file checks if
the /etc/dropbear directory exists and if the RSA host key exists in
this directory.  If the key does exist it sets the path to /etc/dropbear
else it sets it to /var/lib/dropbear. The dropbear service reads this
environment file to determine from which path to load the RSA host key.
This fix is to change dropbearkey.service to have similar logic to read
the file to determine which path to create the RSA host key.  This will
get rid of the above Warning message, which can fill up the log buffer
in a Continuous Test environment where many ssh connection are made.

Change-Id: Iae37a3dfa9aa8c56687560f0f6560114c1e9b85a
Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
1 file changed
tree: 664a048afe451b567ad066b993254bc0f2e27ece
  1. classes/
  2. common/
  3. conf/
  4. COPYING.apache-2.0
  5. COPYING.MIT
  6. LICENSE
  7. README.md
README.md

OpenBMC

meta-phosphor is the OpenBMC layer. This layer should be included for all OpenBMC systems. The OpenBMC layer contains content which is shared between all OpenBMC systems.