[lxc-devel] [lxcfs/master] hook: Don't fail when root mountpoint is a symlink

stgraber on Github lxc-bot at linuxcontainers.org
Tue Mar 22 07:25:16 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 355 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160322/3bb5e382/attachment.bin>
-------------- next part --------------
From 71f0cd30d7c23a8a4aadf2932390d2d5d5bd3e68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 22 Mar 2016 03:24:17 -0400
Subject: [PATCH] hook: Don't fail when root mountpoint is a symlink
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 share/lxc.mount.hook.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/share/lxc.mount.hook.in b/share/lxc.mount.hook.in
index 933ff27..9a6b2c9 100755
--- a/share/lxc.mount.hook.in
+++ b/share/lxc.mount.hook.in
@@ -1,5 +1,8 @@
 #!/bin/sh -e
 
+# We're dealing with mount entries, so expand any symlink
+LXC_ROOTFS_MOUNT=$(readlink -f ${LXC_ROOTFS_MOUNT}
+
 # /proc files
 if [ -d @LXCFSTARGETDIR@/proc/ ]; then
     for entry in @LXCFSTARGETDIR@/proc/*; do


More information about the lxc-devel mailing list