Handle the case where obmc-flash-bmc-ubimount@.service fails

- If the ubi volume creation fails then delete any mount
  points that were created during activation and remove
  the ubi volumes ro-<versionId> and kernel-<versionId>

Resolves openbmc/openbmc#1616

Change-Id: Ifea1188831590a8372ff5f57c6ee6e3230c8ba82
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service
index 98366fd..3606a10 100644
--- a/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service
+++ b/meta-phosphor/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service
@@ -1,5 +1,6 @@
 [Unit]
 Description=Store read-only images %I to BMC storage
+OnFailure=obmc-flash-bmc-ubiro-remove@%i.service
 
 [Service]
 Type=oneshot