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 ...@@ -239,14 +239,14 @@ lxc.rootfs = $rootfs
EOF EOF
libdirs="\ libdirs="\
/lib \ lib \
/usr/lib \ usr/lib \
/lib64 \ lib64 \
/usr/lib64" usr/lib64"
for dir in $libdirs; do for dir in $libdirs; do
if [ -d $dir ] && [ -d "$rootfs$dir" ]; then if [ -d "/$dir" ] && [ -d "$rootfs/$dir" ]; then
echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config echo "lxc.mount.entry=/$dir $dir none ro,bind 0 0" >> $path/config
fi fi
done 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