]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Use BUSYBOX_EXE variable in configure_busybox() 2810/head
authorRachid Koucha <47061324+Rachid-Koucha@users.noreply.github.com>
Sun, 27 Jan 2019 10:51:57 +0000 (11:51 +0100)
committerGitHub <noreply@github.com>
Sun, 27 Jan 2019 10:51:57 +0000 (11:51 +0100)
As "which busybox" is stored in BUSYBOX_EXE
global variable at startup, use it wherever it is
needed.

Signed-off-by: Rachid Koucha <rachid.koucha@gmail.com>
templates/lxc-busybox.in

index f90fa93cc9186ca5bd8e3edea619325bd02862b8..37207495ec9e307d63d50369b25e9c07ee92a570 100644 (file)
@@ -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