dual-image: remount alt partitions during update

When the BMC is to updating the alt image, it needs to stop the sync
manager, umount the rofs/rwfs-alt partitions before the flashing,
mount them after it's done, and restart the sync manager.

Otherwise the mount point of rofs/rwfs-alt will get error because the
content is updated.

Tested: Verify the rofs/rwfs-alt are umounted during the alt flashing,
        and are mounted again after the flashing is done, and the sync
        manager is restarted.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I21e2bd8e0616cf529b9b4e5245d5da1ea4dfb51e
diff --git a/obmc-flash-bmc b/obmc-flash-bmc
index ab353bf..07e730e 100644
--- a/obmc-flash-bmc
+++ b/obmc-flash-bmc
@@ -317,6 +317,12 @@
   fi
 }
 
+umount_static_alt() {
+  altFs=$1
+  altFsMount="/run/media/${altFs}"
+  umount "${altFsMount}"
+}
+
 # Read the current env variable and set it on the alternate boot env
 copy_env_var_to_alt() {
   varName=$1
@@ -707,6 +713,9 @@
   static-altfs)
     mount_static_alt "$2" "$3" "$4"
     ;;
+  umount-static-altfs)
+    umount_static_alt "$2"
+    ;;
   *)
     echo "Invalid argument"
     exit 1