templates: Fix busybox template

Use `busybox --list`, and exclude the `busybox` applet if necessary. Signed-off-by: 's avatarThomas Hipp <thomas.hipp@canonical.com>
parent d2ff3f89
...@@ -187,9 +187,7 @@ configure_busybox() ...@@ -187,9 +187,7 @@ configure_busybox()
# but that only works right in a chroot with busybox >= 1.19.0 # but that only works right in a chroot with busybox >= 1.19.0
( (
cd "${rootfs}/bin" || return 1 cd "${rootfs}/bin" || return 1
./busybox --help | grep 'Currently defined functions:' -A300 | \ ./busybox --list | grep -v busybox | xargs -n1 ln -s busybox
grep -v 'Currently defined functions:' | tr , '\n' | \
xargs -n1 ln -s busybox
) )
# relink /sbin/init # relink /sbin/init
...@@ -232,7 +230,7 @@ EOF ...@@ -232,7 +230,7 @@ EOF
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} ${dir} none ro,bind 0 0" >> "${path}/config" echo "lxc.mount.entry = /${dir} ${dir} none ro,bind 0 0" >> "${path}/config"
......
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