Commit 5d01f616 by Stéphane Graber

lxc-busybox: Use relative mounts in lxc.mount.entry

To make it easier to clone/rename the container, replace hardcoded entries (with rootfs in the destination path) by rootfs-relative entries. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 6bc424b5
......@@ -239,14 +239,14 @@ lxc.rootfs = $rootfs
EOF
libdirs="\
/lib \
/usr/lib \
/lib64 \
/usr/lib64"
lib \
usr/lib \
lib64 \
usr/lib64"
for dir in $libdirs; do
if [ -d $dir ] && [ -d "$rootfs$dir" ]; then
echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config
if [ -d "/$dir" ] && [ -d "$rootfs/$dir" ]; then
echo "lxc.mount.entry=/$dir $dir none ro,bind 0 0" >> $path/config
fi
done
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment