Shell Script to Unmount Multiple Hard Drives?

Hi,

I would like to setup a custom menu shortcut to unmount the external USB Drive. I need that to deconnect the drive in order to use it on another computer that cannot access it through the network.

To do that I’m going to : Settings / Interface / Skin setup / Customize Home Menu.
There I would like to define a custom action, but I didn’t find anything that is working after trying the following :

  • RunScript(“umount ‘/media/MyDrive’”)
  • RunScript(“/bin/bash -c umount /media/MyDrive”)
  • RunScript(“udisks --unmount /media/MyDrive”)
  • System.Exec(“umount ‘/media/MyDrive’”) => calling shortcut twice crashes OSMC.

I’m not a Linux user and I’m only using a Vero 4K and a Rii i25 remote (having a keyboard).
In case it is mandatory to create a python file, can someone advise a simple way to do that? Is there a Kodi AddOn to create and edit a python file from Kodi’s UI / File Manager?

This question is also related to this subject :

Thanks in advance for any help.
Eric