On restore, we pass criu a script to manage the network interfaces (i.e. the
full path to lxc-restore-net), which we previously installed into
/var/lib/<tuple>/lxc. However, this is also the directory that is the default
for use in mounting the rootfs locally before pivot_root()ing. So, we mounted
the rootfs and then happliy called criu, pointing it to this directory which
didn't have lxc-restore-net any more, it just had the container's rootfs.
Instead, we should put lxc-restore-net somewhere else, so that criu can still
see it after the rootfs is mounted.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
AS_AC_EXPAND(RUNTIME_PATH, "$with_runtime_path")
AC_SUBST(DEFAULT_CGROUP_PATTERN, ["$with_cgroup_pattern"])
+# We need the install path so criu knows where to reference the hook scripts.
+AC_DEFINE_UNQUOTED([DATADIR], "$DATADIR", ["Prefix for shared files."])
+
# Check for some standard kernel headers
AC_CHECK_HEADERS([linux/unistd.h linux/netlink.h linux/genetlink.h],
[],
pkglibexec_PROGRAMS = \
lxc-monitord \
lxc-user-nic
-pkglibexec_SCRIPTS = \
- lxc-restore-net
AM_LDFLAGS = -Wl,-E
if ENABLE_RPATH
install-exec-hook:
chmod u+s $(DESTDIR)$(libexecdir)/lxc/lxc-user-nic
+install-data-local:
+ install -c -m 755 lxc-restore-net $(DESTDIR)$(datadir)/lxc
+
uninstall-local:
$(RM) $(DESTDIR)$(libdir)/liblxc.so*
DECLARE_ARG("--force-irmap");
DECLARE_ARG("--manage-cgroups");
DECLARE_ARG("--action-script");
- DECLARE_ARG(LIBEXECDIR "/lxc/lxc-restore-net");
+ DECLARE_ARG(DATADIR "/lxc/lxc-restore-net");
DECLARE_ARG("-D");
DECLARE_ARG(opts->directory);
DECLARE_ARG("-o");