[lxc-devel] [lxc/master] Use BUSYBOX_EXE variable in configure_busybox()
Rachid-Koucha on Github
lxc-bot at linuxcontainers.org
Sun Jan 27 10:52:19 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 463 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190127/2b7e585a/attachment.bin>
-------------- next part --------------
From 4765b926b137d6d8ed4f9a46df5f6e5782dca707 Mon Sep 17 00:00:00 2001
From: Rachid Koucha <47061324+Rachid-Koucha at 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 <rachid.koucha at gmail.com>
---
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 f90fa93cc9..37207495ec 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
More information about the lxc-devel
mailing list