How to trigger mount/umount before/after hibernation? I use s2disk.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You should be able to write a start/stop script which mounts or unmounts your filesystem, and place it in
/etc/pm/sleep.d (assuming that directory exists).
Although this page talks about Lenny, I think it is valid for Wheezy as well.
In summary, your script should work like an init script but handle hibernate, suspend, resume and thaw as inputs. Here's the example from that page,
case "$1" in hibernate|suspend) /etc/init.d/bluetooth stop /etc/init.d/atheros stop ;; thaw|resume) /etc/init.d/bluetooth start /etc/init.d/atheros start ;; *) exit $NA ;; esac