summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alternatives18
-rwxr-xr-xbuild11
-rwxr-xr-xbusybox.pkg/postinst10
-rwxr-xr-xbusybox.pkg/prerm4
-rw-r--r--changelog1
5 files changed, 14 insertions, 30 deletions
diff --git a/alternatives b/alternatives
deleted file mode 100644
index 3631669..0000000
--- a/alternatives
+++ /dev/null
@@ -1,18 +0,0 @@
-/usr/bin/awk awk 10
-/usr/bin/dc dc 10
-/usr/bin/bzip2 bzip2 10
-/usr/bin/bunzip2 bunzip2 10
-/usr/bin/bzcat bzcat 10
-/usr/bin/xz xz 10
-/usr/bin/unxz unxz 10
-/usr/bin/xzcat xzcat 10
-/usr/bin/lzma lzma 10
-/usr/bin/unlzma unlzma 10
-/usr/bin/lzcat lzcat 10
-/usr/bin/ar ar 10
-/usr/bin/strings strings 10
-/usr/bin/clear clear 10
-/usr/bin/reset reset 10
-/usr/bin/mkpasswd mkpasswd 20
-/usr/bin/patch patch 10
-/usr/bin/lspci lspci 10
diff --git a/build b/build
index a41ce87..ffa7a20 100755
--- a/build
+++ b/build
@@ -35,13 +35,10 @@ install: build
chmod u+s dest/bin/busybox
mkdir -p dest/usr/share/busybox
set -e; exec 3>dest/usr/share/busybox/alternatives; \
- while read link name prio; do \
- if [ -e "dest/$${link}" ]; then \
- mv "dest/$${link}" "dest/$${link}.busybox"; \
- printf '%s %s %s\n' "$${link}" "$${name}" "$${prio}" \
- >&3; \
- fi; \
- done <../alternatives; \
+ for f in dest/bin/* dest/sbin/* dest/usr/bin/* dest/usr/sbin/*; do \
+ mv "$${f}" "$${f}.busybox"; \
+ printf '%s\n' "$${f#dest}" >&3; \
+ done; \
exec 3>&-
set -e; $(config_enabled); $(install_init_script); \
if config_enabled INIT; then \
diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst
index 9f23a39..ae66306 100755
--- a/busybox.pkg/postinst
+++ b/busybox.pkg/postinst
@@ -1,9 +1,13 @@
#!/bin/sh
if [ "x${1}" = 'xconfigure' ]; then
- while read link name prio; do
- update-alternatives --install "${link}" "${name}" \
- "${link}.busybox" "${prio}"
+ while read link; do
+ # 15 is a (temporary?) middle ground: alternatives that should
+ # override busybox's have priority 20 (which should maybe be
+ # increased to 30), and expect-doc provides a /usr/bin/mkpasswd
+ # alternative with priority 10.
+ update-alternatives --install "${link}" "${link##*/}" \
+ "${link}.busybox" 15
done </usr/share/busybox/alternatives
if ! [ -f /etc/rc.policy ]; then
if [ "x$(cat /etc/proteanos_plat)" = 'xdev' ]; then
diff --git a/busybox.pkg/prerm b/busybox.pkg/prerm
index 30ebdab..39f963d 100755
--- a/busybox.pkg/prerm
+++ b/busybox.pkg/prerm
@@ -6,8 +6,8 @@ if [ "x${1}" = 'xupgrade' ]; then
"/etc/init.d/${script}" stop
done </usr/share/busybox/init-scripts
fi
- while read link name prio; do
- update-alternatives --remove "${name}" "${link}.busybox"
+ while read link; do
+ update-alternatives --remove "${link##*/}" "${link}.busybox"
done </usr/share/busybox/alternatives
if [ -f /usr/share/busybox/www/SHA256SUMS ]; then
if [ -f /var/www/index.html ] && \
diff --git a/changelog b/changelog
index fd0fd02..cb07fc3 100644
--- a/changelog
+++ b/changelog
@@ -1,6 +1,7 @@
busybox (1.32.0-1) trunk
* New upstream release.
+ * Manage all applet links with update-alternatives.
-- Patrick McDermott <patrick.mcdermott@libiquity.com> Wed, 04 Nov 2020 03:58:13 -0500