]> git.proxmox.com Git - mirror_lxc.git/commitdiff
run stop hook between STOPPING and STOPPED states
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 6 Oct 2015 08:01:04 +0000 (10:01 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 7 Oct 2015 15:38:11 +0000 (16:38 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/start.c

index b7982b6c8631fe9b198a8fa6d5271e0d65e3a56e..56fbe43abd1f83c6e53a4bc4eefc0a76044e26a3 100644 (file)
@@ -493,6 +493,8 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
         */
        lxc_set_state(name, handler, STOPPING);
 
+       if (run_lxc_hooks(name, "stop", handler->conf, handler->lxcpath, NULL))
+               ERROR("failed to run stop hooks for container '%s'.", name);
        for (i = 0; i < LXC_NS_MAX; i++) {
                if (handler->nsfd[i] != -1) {
                        close(handler->nsfd[i]);