On Fri, Jul 27, 2012 at 6:08 PM, Manuel Amador (Rudd-O) <[email protected]> wrote: > I need to run a program right before any file system is unmounted, to record > the current file system state on disk.
I would create a Type=oneshot, RemainAfterExit service with WantedBy= and After= the mount. You may need to re-"enable" the service or the mount to get the dependency properly rigged. It's probably possible for it to have something like "echo" as the ExecStart= and your utility as the ExecStopPost=. This would cause the service to be started and "running" when the mount starts up and shut down and run ExecStopPost before the mount goes away. I have not tested any of this, but it's the best I can come up with for allowing clean dependency injection for an arbitrary command to run before stopping a mount. -- David Strauss | [email protected] | +1 512 577 5827 [mobile] _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
