openpower-software-manager: Move ubiumount.service logic to script

The service files that manage the pnor ubi volumes and mount points are
starting to get too much logic in them. Move the logic to a shell script.

Closes openbmc/openbmc#1673

Change-Id: I6c9fb239b493eb64049fd4b8efc9be6eaf5b9b79
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service
index b272402..84fd523 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiumount-rw@.service
@@ -6,11 +6,4 @@
 [Service]
 Type=oneshot
 RemainAfterExit=no
-ExecStart=/bin/sh -c 'rw=pnor-rw-%i; \
-                      if grep -q $rw /proc/mounts; then \
-                        umount /media/$rw; fi; \
-                      rw_ubi=`ubinfo -d 0 -a | grep $rw`; \
-                      if [ ! -z "$rw_ubi" ]; then \
-                        {sbindir}/ubirmvol /dev/ubi0 -N $rw; fi; \
-                      if [ -d "/media/$rw" ]; then \
-                        rm -r /media/$rw; fi;'
+ExecStart={sbindir}/obmc-flash-bios ubiumount pnor-rw-%i