Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #51969
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ben Hutchings <ben@decadent.org.uk> |
| Newsgroups | linux.debian.kernel |
| Subject | [PATCH initramfs-tools] Restore automatic selection between busybox and klibc by default |
| Date | Thu, 31 Dec 2015 05:10:02 +0100 |
| Message-ID | <qLCIO-7Ps-1@gated-at.bofh.it> (permalink) |
| X-Mailbox-Line | From debian-kernel-request@lists.debian.org Thu Dec 31 04:02:08 2015 |
| Old-Return-Path | <ben@decadent.org.uk> |
| X-Amavis-Spam-Status | No, score=-13.28 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, PGPSIGNATURE=-5, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no |
| MIME-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="enQ4buem96rqs4uP" |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| X-Sa-Exim-Connect-IP | <locally generated> |
| X-Sa-Exim-Mail-From | ben@decadent.org.uk |
| X-Sa-Exim-Version | 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) |
| X-Sa-Exim-Scanned | Yes (on shadbolt.decadent.org.uk) |
| X-Mailing-List | <debian-kernel@lists.debian.org> archive/latest/105614 |
| List-ID | <debian-kernel.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-kernel/> |
| List-Archive | https://lists.debian.org/msgid-search/20151231040143.GA28542@decadent.org.uk |
| Approved | robomod@news.nic.it |
| Lines | 113 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Date | Thu, 31 Dec 2015 04:01:44 +0000 |
| X-Original-Message-ID | <20151231040143.GA28542@decadent.org.uk> |
| Xref | csiph.com linux.debian.kernel:51969 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Some systems are working alright with the old default of BUSYBOX=y and
no busybox installed. We should only force use of busybox if another
package installing initramfs scripts needs it.
Change the default from BUSYBOX=y to BUSYBOX=auto, and give that the
old semantics.
Closes: #809204
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
conf/initramfs.conf | 6 ++++--
hooks/busybox | 19 ++++++++++++-------
hooks/klibc | 3 ++-
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/conf/initramfs.conf b/conf/initramfs.conf
index 367d561..f0f5071 100644
--- a/conf/initramfs.conf
+++ b/conf/initramfs.conf
@@ -20,12 +20,14 @@
MODULES=most
#
-# BUSYBOX: [ y | n ]
+# BUSYBOX: [ y | n | auto ]
#
# Use busybox shell and utilities. If set to n, klibc utilities will be used.
+# If set to auto (or unset), busybox will be used if installed and klibc will
+# be used otherwise.
#
-BUSYBOX=y
+BUSYBOX=auto
#
# KEYMAP: [ y | n ]
diff --git a/hooks/busybox b/hooks/busybox
index 45d4bea..c01d06d 100755
--- a/hooks/busybox
+++ b/hooks/busybox
@@ -16,14 +16,19 @@ prereqs)
esac
# busybox
-if [ "${BUSYBOX}" != "n" ]; then
- if ! [ -e ${BUSYBOXDIR}/busybox ]; then
+if [ "${BUSYBOX}" = "n" ]; then
+ exit 0
+fi
+if ! [ -e ${BUSYBOXDIR}/busybox ]; then
+ if [ "${BUSYBOX}" = "y" ]; then
echo >&2 "E: busybox is required but not installed"
exit 1
+ else
+ exit 0
fi
- . /usr/share/initramfs-tools/hook-functions
- rm -f ${DESTDIR}/bin/sh
- rm -f ${DESTDIR}/bin/busybox
- copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
- ln -s busybox ${DESTDIR}/bin/sh
fi
+. /usr/share/initramfs-tools/hook-functions
+rm -f ${DESTDIR}/bin/sh
+rm -f ${DESTDIR}/bin/busybox
+copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
+ln -s busybox ${DESTDIR}/bin/sh
diff --git a/hooks/klibc b/hooks/klibc
index 9047199..2e753ed 100755
--- a/hooks/klibc
+++ b/hooks/klibc
@@ -19,7 +19,8 @@ esac
cp -pnL /usr/lib/klibc/bin/* ${DESTDIR}/bin
cp -pL /lib/klibc-*.so ${DESTDIR}/lib
rm -f ${DESTDIR}/bin/kinit* ${DESTDIR}/bin/zcat
-if [ "${BUSYBOX}" = "n" ]; then
+if [ "${BUSYBOX}" = "n" ] || \
+ { [ "${BUSYBOX}" != "y" ] && ! [ -e ${BUSYBOXDIR}/busybox ]; }; then
if [ -e ${DESTDIR}/bin/sh.shared ]; then
# Some platforms build a shared klibc/sh:
mv ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh
Back to linux.debian.kernel | Previous | Next | Find similar | Unroll thread
[PATCH initramfs-tools] Restore automatic selection between busybox and klibc by default Ben Hutchings <ben@decadent.org.uk> - 2015-12-31 05:10 +0100
csiph-web