[lxc-devel] [PATCH master 2/7] Fix verification of start hook without a rootfs

David Ward david.ward at ll.mit.edu
Tue Jun 23 14:57:20 UTC 2015


Signed-off-by: David Ward <david.ward at ll.mit.edu>
---
 src/lxc/conf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 21d16e4..0e5e748 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -3698,12 +3698,12 @@ static bool verify_start_hooks(struct lxc_conf *conf)
 		int ret;
 
 		ret = snprintf(path, MAXPATHLEN, "%s%s",
-			conf->rootfs.mount, hookname);
+			conf->rootfs.path ? conf->rootfs.mount : "", hookname);
 		if (ret < 0 || ret >= MAXPATHLEN)
 			return false;
 		ret = stat(path, &st);
 		if (ret) {
-			SYSERROR("Start hook %s not found in container rootfs",
+			SYSERROR("Start hook %s not found in container",
 					hookname);
 			return false;
 		}
@@ -3803,7 +3803,7 @@ int lxc_setup(struct lxc_handler *handler)
 		return -1;
 	}
 
-	/* Make sure any start hooks are in the rootfs */
+	/* Make sure any start hooks are in the container */
 	if (!verify_start_hooks(lxc_conf))
 		return -1;
 
-- 
1.7.1



More information about the lxc-devel mailing list