diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2015-09-30 15:53:17 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-01 07:43:37 +0100 |
commit | d592abd25537c812f0a89f1ac4925a8d63271046 (patch) | |
tree | b56ff51d94b7f25982d8dc8b08f9a8e9dfea3900 /meta/classes | |
parent | 299806d0dcb77271cb004b032cbfd83aa6fc4a00 (diff) | |
download | poky-d592abd25537c812f0a89f1ac4925a8d63271046.tar.gz |
image.bbclass: tweak the key location for dropbear when rootfs is readonly
In the same way it's done for openssh.
(From OE-Core rev: a4b91f5199dd4d1302484cbd972a484d36f7886f)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 9fbdce583c..d2f8105f13 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -251,6 +251,17 @@ read_only_rootfs_hook () { | |||
251 | echo "SSHD_OPTS='-f /etc/ssh/sshd_config_readonly'" >> ${IMAGE_ROOTFS}/etc/default/ssh | 251 | echo "SSHD_OPTS='-f /etc/ssh/sshd_config_readonly'" >> ${IMAGE_ROOTFS}/etc/default/ssh |
252 | fi | 252 | fi |
253 | fi | 253 | fi |
254 | |||
255 | # Also tweak the key location for dropbear in the same way. | ||
256 | if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then | ||
257 | if [ -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then | ||
258 | echo "DROPBEAR_RSAKEY_DIR=/etc/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear | ||
259 | else | ||
260 | echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear | ||
261 | fi | ||
262 | fi | ||
263 | |||
264 | |||
254 | if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then | 265 | if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then |
255 | # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes | 266 | # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes |
256 | if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then | 267 | if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then |