phosphor: systemd: add init alternative

This is removed upstream in thud (poky rev: ada8a5d) but we have a
recipe that depends on it (preinit-mounts).  preinit-mounts is only
added to the rootfs when DISTRO_FEATURES contains obmc-ubi-fs.

preinit-mounts might be a bit of a hack; getting filesystems mounted
just right is typically the role of an initramfs.  It may make sense
to (re)visit how that is done and at that time we can drop this
support.

(From meta-phosphor rev: 2fb0a1b55ce9d4f133f34eda6e6df0aead585fef)

Change-Id: Iac2acd7e2f23055387a3250392461a78ec361da8
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
index 7ab626e..213f327 100644
--- a/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
+++ b/meta-phosphor/recipes-core/systemd/systemd_%.bbappend
@@ -15,3 +15,8 @@
 do_install_append() {
         install -m 644 ${WORKDIR}/default.network ${D}${systemd_unitdir}/network/
 }
+
+ALTERNATIVE_${PN} += "init"
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"