openpower-software-manager: Add service dependencies

For the updatesymlinks service, add a dependency to the pnor updater,
since the pnor updater is started after the ubi volumes are remounted
and the updater creates the priority files. The updatesymlinks service
requires these files and directories to exist in order to create the
symlinks that mboxd uses.

For the ubipatch service, add a dependency to run before mboxd, so
that mboxd finds the pnor patches by the time it starts.

Resolves openbmc/openbmc#2417

Change-Id: Ife2a137e1cd262a6cf8cb93522ad1826b0082739
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service
index 8afc327..206d314 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubipatch.service
@@ -1,5 +1,6 @@
 [Unit]
 Description=Create a ubi volume for pnor patches
+Before=mboxd.service
 Wants=usr-local.mount
 After=usr-local.mount
 
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service
index 49e495e..4dca5a1 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-updatesymlinks.service
@@ -2,6 +2,7 @@
 Description=Updates symlinks for active PNOR version
 Before=mboxd.service
 Before=mboxd-reload@.service
+After=org.open_power.Software.Host.Updater.service
 
 [Service]
 Type=oneshot