]> git.proxmox.com Git - mirror_lxc.git/commitdiff
templates: Fix busybox template
authorThomas Hipp <thomas.hipp@canonical.com>
Wed, 20 Jun 2018 14:21:31 +0000 (16:21 +0200)
committerThomas Hipp <thomas.hipp@canonical.com>
Wed, 20 Jun 2018 14:56:04 +0000 (16:56 +0200)
Use `busybox --list`, and exclude the `busybox` applet if necessary.

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
templates/lxc-busybox.in

index 82666b1cb06d6a96d9834a3f210f36c33b64a1fc..c283b00cbd8a904a7ba045c8792722de4a0c312c 100644 (file)
@@ -187,9 +187,7 @@ configure_busybox()
   # but that only works right in a chroot with busybox >= 1.19.0
   (
     cd "${rootfs}/bin" || return 1
-    ./busybox --help | grep 'Currently defined functions:' -A300 | \
-      grep -v 'Currently defined functions:' | tr , '\n' | \
-      xargs -n1 ln -s busybox
+    ./busybox --list | grep -v busybox | xargs -n1 ln -s busybox
   )
 
   # relink /sbin/init
@@ -232,7 +230,7 @@ EOF
     usr/lib \
     lib64 \
     usr/lib64"
-  
+
   for dir in ${libdirs}; do
     if [ -d "/${dir}" ] && [ -d "${rootfs}/${dir}" ]; then
       echo "lxc.mount.entry = /${dir} ${dir} none ro,bind 0 0" >> "${path}/config"