Merge pull request #112 from bradbishop/dropbear
Set dropbearkey service to start on boot
diff --git a/meta-phosphor/common/recipes-core/dropbear/dropbear/dropbearkey.service b/meta-phosphor/common/recipes-core/dropbear/dropbear/dropbearkey.service
new file mode 100644
index 0000000..623f73e
--- /dev/null
+++ b/meta-phosphor/common/recipes-core/dropbear/dropbear/dropbearkey.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=SSH Key Generation
+ConditionPathExists=|!/etc/dropbear/dropbear_rsa_host_key
+
+[Service]
+Type=oneshot
+ExecStart=@SBINDIR@/dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-core/dropbear/dropbear_%.bbappend b/meta-phosphor/common/recipes-core/dropbear/dropbear_%.bbappend
new file mode 100644
index 0000000..36c0dcd
--- /dev/null
+++ b/meta-phosphor/common/recipes-core/dropbear/dropbear_%.bbappend
@@ -0,0 +1,2 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://dropbearkey.service"