Wow this one has been around a while. The simplest way to run a script before stopping, only on shutdown, but not on restarts, is to use the UPSTART_EVENTS. environment variable.
pre-stop script if [ x$UPSTART_EVENTS = xrunlevel ] ; then shutdown_guests fi end script -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/350936 Title: Should shut down domains on system shutdown -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs