summaryrefslogtreecommitdiffstats
path: root/meta/classes/rootfs-postcommands.bbclass
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2018-05-30 17:16:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-04 15:15:00 +0100
commit762a3f229c42b734160334fb462beaf576353a58 (patch)
tree31c6b434e2bacf748e3a98f3cd4e9be818d8fcf5 /meta/classes/rootfs-postcommands.bbclass
parentb7f6638962b0348ae93c1d5a7696c80e2b7933ed (diff)
downloadpoky-762a3f229c42b734160334fb462beaf576353a58.tar.gz
dropbear: drop run time detection of read-only rootfs
Previously, when dropbear was started via its init script, relocation of DROPBEAR_RSAKEY_DIR to support read-only rootfs was handled at run time from within the init script. Update the init script to take advantage of the read-only rootfs config setup by read_only_rootfs_hook() and therefore be consistent with startup under systemd (where relocation of DROPBEAR_RSAKEY_DIR is handled by the read_only_rootfs_hook() at build time). (From OE-Core rev: 4990f87b2f6a8b30c8d1c767636e7f5527f595ba) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r--meta/classes/rootfs-postcommands.bbclass5
1 files changed, 1 insertions, 4 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index 5522209534..221869e04c 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -112,14 +112,11 @@ read_only_rootfs_hook () {
112 112
113 # Also tweak the key location for dropbear in the same way. 113 # Also tweak the key location for dropbear in the same way.
114 if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then 114 if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then
115 if [ -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then 115 if [ ! -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then
116 echo "DROPBEAR_RSAKEY_DIR=/etc/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
117 else
118 echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear 116 echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
119 fi 117 fi
120 fi 118 fi
121 119
122
123 if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then 120 if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
124 # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes 121 # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
125 if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then 122 if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then