Commit 6bc424b5 by Stuart Yoder Committed by Stéphane Graber

busybox: for all lib dirs create mounts only if directories exist

parent d595c68a
...@@ -238,24 +238,17 @@ lxc.rootfs = $rootfs ...@@ -238,24 +238,17 @@ lxc.rootfs = $rootfs
#lxc.aa_profile = unconfined #lxc.aa_profile = unconfined
EOF EOF
if [ -d "$rootfs/lib" ]; then libdirs="\
cat <<EOF >> $path/config /lib \
lxc.mount.entry=/lib $rootfs/lib none ro,bind 0 0 /usr/lib \
lxc.mount.entry=/usr/lib $rootfs/usr/lib none ro,bind 0 0 /lib64 \
EOF /usr/lib64"
fi
for dir in $libdirs; do
if [ -d "/lib64" ] && [ -d "$rootfs/lib64" ]; then if [ -d $dir ] && [ -d "$rootfs$dir" ]; then
cat <<EOF >> $path/config echo "lxc.mount.entry=$dir $rootfs$dir none ro,bind 0 0" >> $path/config
lxc.mount.entry=/lib64 $rootfs/lib64 none ro,bind 0 0 fi
EOF done
fi
if [ -d "/usr/lib64" ] && [ -d "$rootfs/usr/lib64" ]; then
cat <<EOF >> $path/config
lxc.mount.entry=/usr/lib64 $rootfs/usr/lib64 none ro,bind 0 0
EOF
fi
} }
usage() usage()
......
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