fstab: require service file to mount /var - fixes BMC factory reset
This commit adds a service file requirement to fstab for mounting
the ubi0:rwfs volume to /var. The required file is
obmc-flash-bmc-reset.service, which, when called, will perform a
BMC factory reset if the corresponding environment variable is set.
This functionality was moved out of obmc-flash-bmc-ubirw.service because
the factory reset is not the only procedure that calls that service.
Moving this function to a new service avoids unexpected behaviors.
Resolves openbmc/openbmc#2326
Change-Id: If2a9c650f315cff23040194ec87f16c05622c85e
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
diff --git a/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiremount.service b/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiremount.service
index ff571d7..388bb1a 100644
--- a/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiremount.service
+++ b/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiremount.service
@@ -2,6 +2,8 @@
Description=Remount the ubi volume after a reboot
Wants=xyz.openbmc_project.Software.BMC.Updater.service
Before=xyz.openbmc_project.Software.BMC.Updater.service
+Wants=obmc-flash-bmc-setenv@rwreset.service
+After=obmc-flash-bmc-setenv@rwreset.service
[Service]
Type=oneshot