Signed-off-by: Dwight Engen <dwight.en...@oracle.com>
---
 src/lxc/lxccontainer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index c5aae99..b0695bc 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -1987,6 +1987,8 @@ static int clone_update_rootfs(struct lxc_container *c0,
                ret = snprintf(path, MAXPATHLEN, "%s/etc/hostname", bdev->dest);
                if (ret < 0 || ret >= MAXPATHLEN)
                        exit(1);
+               if (!file_exists(path))
+                       exit(0);
                if (!(fout = fopen(path, "w"))) {
                        SYSERROR("unable to open %s: ignoring\n", path);
                        exit(0);
-- 
1.8.1.4


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to