Run Bash Script on Wakeup from Suspend
I have a Linux Virtual Machine running on a VMWare ESXi Host. I need the OS to remount the CDROM when waking up from "Suspend" (In VMWare the machine is "Suspended", some things are changed and then "Powered On").
I've tried multiple options, including adding a script to /etc/pm/sleep.d/ and adding an ACPI script for "wakeup" but none of these seem to work, the "Remount" script I'm running works fine if ran manually (and is simply a 2 line script compromising of u mount and mount).
Does anyone have any suggestions as to what I can do to get this working? I'm running Ubuntu Linux and the version of the ESXi host is 4.1. Any suggestions would be greatly appreciated.