From 4765b926b137d6d8ed4f9a46df5f6e5782dca707 Mon Sep 17 00:00:00 2001 From: Rachid Koucha <47061324+Rachid-Koucha@users.noreply.github.com> Date: Sun, 27 Jan 2019 11:51:57 +0100 Subject: [PATCH] Use BUSYBOX_EXE variable in configure_busybox() As "which busybox" is stored in BUSYBOX_EXE global variable at startup, use it wherever it is needed. Signed-off-by: Rachid Koucha --- templates/lxc-busybox.in | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/templates/lxc-busybox.in b/templates/lxc-busybox.in index f90fa93cc..37207495e 100644 --- a/templates/lxc-busybox.in +++ b/templates/lxc-busybox.in @@ -179,13 +179,8 @@ configure_busybox() { rootfs="${1}" - if ! which busybox > /dev/null 2>&1; then - echo "ERROR: Failed to find busybox binary" - return 1 - fi - # copy busybox in the rootfs - if ! cp "$(which busybox)" "${rootfs}/bin"; then + if ! cp "${BUSYBOX_EXE}" "${rootfs}/bin"; then echo "ERROR: Failed to copy busybox binary" return 1 fi -- 2.47.2